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 String
The name of the "contour levels" property.static final String
The 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 ContourLevels
Returns the contour levels.final boolean
Indicates whether or not contour-line labeling is enabled.final void
setContourLevels
(ContourLevels contourLevels) Sets the contour values.protected void
Sets the control of the underlyingScalarMap
.final void
setLabeling
(boolean on) Sets the labeling of contour lines.void
setRange
(float min, float max) Sets the range of data to be contoured.Methods inherited from class ucar.visad.display.IsoContourScalarMap
getContourControl
Methods inherited from class ucar.visad.display.ScalarMapAdapter
addScalarMapListener, compareTo, equals, getControl, getDisplayType, getScalarType, hashCode, removeScalarMapListener, scalarMapChange, setRange, setScalarType
Methods 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 aPropertyChangeEvent
forLABELING
with 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:
true
if 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 aPropertyChangeEvent
forCONTOUR_LEVELS
with 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:
setControl
in classScalarMapAdapter
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-