Package ucar.visad.display
Class ContourLevels
java.lang.Object
ucar.visad.display.ContourLevels
- Direct Known Subclasses:
IrregularContourLevels
,RegularContourLevels
Provides support for contour levels.
Instances are immutable.
- Version:
- $Revision: 1.10 $
- Author:
- Steven R. Emmerson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs an instance.protected
ContourLevels
(float base) Constructs an instance with a given base contour level. -
Method Summary
Modifier and TypeMethodDescriptionfinal float
getBase()
Returns the base contour level.abstract float[]
getLevels
(float minimum, float maximum) Gets the contour levels given a data range.abstract void
setControl
(ContourControl control) Sets a VisAD ContourControl.abstract void
setControl
(ContourControl control, float minimum, float maximum) Sets a VisAD ContourControl.
-
Constructor Details
-
ContourLevels
protected ContourLevels()Constructs an instance. The base contour level will be zero. -
ContourLevels
protected ContourLevels(float base) Constructs an instance with a given base contour level.- Parameters:
base
- The base contour level.
-
-
Method Details
-
getBase
public final float getBase()Returns the base contour level. The base contour level either determines the transition between dashed and solid contour lines or is a contour line value.- Returns:
- The base contour level.
-
getLevels
Gets the contour levels given a data range.- Parameters:
minimum
- The minimum data value.maximum
- The maximum data 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.- Parameters:
control
- The VisAD ContourControl to be set by this object.- Throws:
VisADException
- Couldn't perform necessary VisAD operation.RemoteException
- Java RMI failure.
-
setControl
public abstract void setControl(ContourControl control, float minimum, float maximum) throws VisADException, RemoteException Sets a VisAD ContourControl.- Parameters:
control
- The VisAD ContourControl to be set by this object.minimum
- The minimum value. It shall not be Float.NEGATIVE_INFINITYmaximum
- The maximum value. It shall not be Float.POSITIVE_INFINITY- Throws:
VisADException
- Couldn't perform necessary VisAD operation.RemoteException
- Java RMI failure.
-