Package ucar.visad.display
Class IrregularContourLevels
java.lang.Object
ucar.visad.display.ContourLevels
ucar.visad.display.IrregularContourLevels
Provides support for irregular contours, which are characterized by an
explicit set of contour levels.
Instances of this class are immutable.
- Version:
- $Revision: 1.9 $
- Author:
- Steven R. Emmerson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIrregularContourLevels(float[] levels) Constructs an instance from a list of contour values.IrregularContourLevels(float[] levels, float base) Constructs an instance from a list of contour values and a base contour level for dashed lines.IrregularContourLevels(float[] levels, float base, boolean dash) Constructs an instance from a list of contour values and a base contour level for dashed lines. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]getLevels(float minimum, float maximum) Gets the contour levels given a data range.voidsetControl(ContourControl control) Sets a VisAD ContourControl.voidsetControl(ContourControl control, float minimum, float maximum) Sets a VisAD ContourControl.Methods inherited from class ucar.visad.display.ContourLevels
getBase
-
Field Details
-
levels
protected final float[] levelsThe set of contour levels.
-
-
Constructor Details
-
IrregularContourLevels
public IrregularContourLevels(float[] levels) Constructs an instance from a list of contour values. The base contour for dashed lines shall be zero.- Parameters:
levels- The contour levels. They shall be ordered by increasing value.
-
IrregularContourLevels
public IrregularContourLevels(float[] levels, float base) Constructs an instance from a list of contour values and a base contour level for dashed lines.- Parameters:
levels- The contour levels. They shall be ordered by increasing value.base- The base contour level. Contour lines below this value will be dashed.
-
IrregularContourLevels
public IrregularContourLevels(float[] levels, float base, boolean dash) Constructs an instance from a list of contour values and a base contour level for dashed lines.- Parameters:
levels- The contour levels. They shall be ordered by increasing value.base- The base contour level. Contour lines below this value will be dashed.dash- dash contours below base if true
-
-
Method Details
-
getLevels
public float[] getLevels(float minimum, float maximum) Gets the contour levels given a data range.- Specified by:
getLevelsin classContourLevels- 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.
-
setControl
Sets a VisAD ContourControl.- Specified by:
setControlin classContourLevels- Parameters:
control- The VisAD ContourControl to be set by this object.- Throws:
VisADException- 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:
setControlin classContourLevels- 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- VisAD failure.RemoteException- Java RMI failure.
-