Package ucar.visad.display
Class RegularContourLevels
java.lang.Object
ucar.visad.display.ContourLevels
ucar.visad.display.RegularContourLevels
Provides support for regular contours, which are characterized by a constant
contour interval.
Instances of this class are immutable.
- Version:
- $Revision: 1.12 $
- Author:
- Steven R. Emmerson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegularContourLevels
(float interval) Constructs an instance.RegularContourLevels
(float interval, float base) Constructs an instance.RegularContourLevels
(float interval, float base, float minimum, float maximum) Constructs an instance.RegularContourLevels
(float interval, float base, float minimum, float maximum, boolean dash) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
Gets the contour levels as an array.float[]
getLevels
(float minimum, float maximum) Gets the contour levels given a data range.void
setControl
(ContourControl control) Sets a VisAD ContourControl.void
setControl
(ContourControl control, float minimum, float maximum) Sets a VisAD ContourControl.Methods inherited from class ucar.visad.display.ContourLevels
getBase
-
Field Details
-
interval
protected final float intervalThe contour interval. -
minimum
protected final float minimumThe minimum contour level. -
maximum
protected final float maximumThe maximum contour level.
-
-
Constructor Details
-
RegularContourLevels
public RegularContourLevels(float interval) Constructs an instance. The base contour will be zero, the minimum contour will be negative infinity, and the maximum contour will be positive infinity.- Parameters:
interval
- The contour interval.
-
RegularContourLevels
public RegularContourLevels(float interval, float base) Constructs an instance.- Parameters:
interval
- The contour interval.base
- The base contour.
-
RegularContourLevels
public RegularContourLevels(float interval, float base, float minimum, float maximum) Constructs an instance.- Parameters:
interval
- The contour interval.base
- The base contour. Contours below this level will be dashed.minimum
- The minimum contour. Must be a finite value.maximum
- The maximum contour. Must be a finite value.
-
RegularContourLevels
public RegularContourLevels(float interval, float base, float minimum, float maximum, boolean dash) Constructs an instance.- Parameters:
interval
- The contour interval.base
- The base contour. Contours below this level will be dashed.minimum
- The minimum contour. Must be a finite value.maximum
- The maximum contour. Must be a finite value.dash
- Whether or not to draw dashed lines for contours less than the base.
-
-
Method Details
-
getLevels
Gets the contour levels as an array. This instance must have been constructed with valid range extrema.- Returns:
- Contour levels appropriate for the given data range. No contour level will lie outside the valid range. The levels will be ordered by increasing value.
- Throws:
VisADException
- Invalid range extrema or VisAD failure.
-
getLevels
Gets the contour levels given a data range.- Specified by:
getLevels
in classContourLevels
- Parameters:
minimum
- The minimum data value. Must be a finite value.maximum
- The maximum data value. Must be a finite value.- Returns:
- Contour levels appropriate for the given data range. No contour level will lie outside the range. The levels will be ordered by increasing value.
- Throws:
VisADException
- Invalid range extrema or VisAD failure.
-
setControl
Sets a VisAD ContourControl. This instance must have been constructed with minimum and maximum range values.- Specified by:
setControl
in classContourLevels
- Parameters:
control
- The VisAD ContourControl to be set by this object.- Throws:
VisADException
- Invalid range extrema or VisAD failure.RemoteException
- Java RMI failure.
-
setControl
public void setControl(ContourControl control, float minimum, float maximum) throws VisADException, RemoteException Sets a VisAD ContourControl.- Specified by:
setControl
in classContourLevels
- Parameters:
control
- The VisAD ContourControl to be set by this object.minimum
- The minimum value. Shall be a finite value.maximum
- The maximum value. Shall be a finite value.- Throws:
VisADException
- Invalid range extrema or VisAD failure.RemoteException
- Java RMI failure.
-