Package ucar.visad.display
Class ContourScalarMap
java.lang.Object
ucar.visad.display.MapAdapter
ucar.visad.display.ScalarMapAdapter
ucar.visad.display.IsoContourScalarMap
ucar.visad.display.ContourScalarMap
- All Implemented Interfaces:
Comparable,Propertied
Provides support for adapting ScalarMap-s for 2-D contour lines.
Instances of this class have the following, bound, JavaBean
properties:
| Name | Type | Access | Default | Description |
|---|---|---|---|---|
| contourLevels | ContourLevels |
set/get | empty-set of levels | The contour levels of this instance |
| labeling | boolean |
set/get | false |
Whether or not contour-line labeling is enabled |
- Version:
- $Revision: 1.8 $
- Author:
- Steven R. Emmerson
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the "contour levels" property.static final StringThe name of the "labeling" property.Fields inherited from class ucar.visad.display.ScalarMapAdapter
SCALAR_MAP, SCALAR_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ContourLevelsReturns the contour levels.final booleanIndicates whether or not contour-line labeling is enabled.final voidsetContourLevels(ContourLevels contourLevels) Sets the contour values.protected voidSets the control of the underlyingScalarMap.final voidsetLabeling(boolean on) Sets the labeling of contour lines.voidsetRange(float min, float max) Sets the range of data to be contoured.Methods inherited from class ucar.visad.display.IsoContourScalarMap
getContourControlMethods inherited from class ucar.visad.display.ScalarMapAdapter
addScalarMapListener, compareTo, equals, getControl, getDisplayType, getScalarType, hashCode, removeScalarMapListener, scalarMapChange, setRange, setScalarTypeMethods inherited from class ucar.visad.display.MapAdapter
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getDisplayRealType, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
CONTOUR_LEVELS
The name of the "contour levels" property.- See Also:
-
LABELING
The name of the "labeling" property.- See Also:
-
-
Constructor Details
-
ContourScalarMap
public ContourScalarMap(RealType realType, DisplayAdapter display) throws VisADException, RemoteException Constructs.- Parameters:
realType- The type of data that is to be contoured.display- The adapted VisAD display on which to contour the data.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
-
Method Details
-
setLabeling
Sets the labeling of contour lines. This method fires aPropertyChangeEventforLABELINGwith this instance as the source and the old and new values appropriately set. The event is fired synchronously -- so watch out for deadlock.- Parameters:
on- Whether or not the contour lines should be labeled.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
isLabeling
public final boolean isLabeling()Indicates whether or not contour-line labeling is enabled.- Returns:
trueif and only if the contour lines are labeled.
-
setRange
Sets the range of data to be contoured.- Parameters:
min- The minimum, possible data value to be consideredmax- The maximum, possible data value to be considered- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
setContourLevels
public final void setContourLevels(ContourLevels contourLevels) throws RemoteException, VisADException Sets the contour values. This method fires aPropertyChangeEventforCONTOUR_LEVELSwith this instance as the source and the old and new values appropriately set. The firing is done synchronously -- so watch out for deadlock.- Parameters:
contourLevels- The contour values.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.- See Also:
-
getContourLevels
Returns the contour levels.- Returns:
- The Contour levels. The initial value is an empty set of levels.
-
setControl
Sets the control of the underlyingScalarMap. This is a template method.- Specified by:
setControlin classScalarMapAdapter- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-