ucar.visad.display
Class ContourScalarMap

java.lang.Object
  extended by ucar.visad.display.MapAdapter
      extended by ucar.visad.display.ScalarMapAdapter
          extended by ucar.visad.display.IsoContourScalarMap
              extended by ucar.visad.display.ContourScalarMap
All Implemented Interfaces:
Comparable, Propertied

public class ContourScalarMap
extends IsoContourScalarMap

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
static String CONTOUR_LEVELS
          The name of the "contour levels" property.
static String LABELING
          The name of the "labeling" property.
 
Fields inherited from class ucar.visad.display.ScalarMapAdapter
SCALAR_MAP, SCALAR_TYPE
 
Constructor Summary
ContourScalarMap(RealType realType, DisplayAdapter display)
          Constructs.
 
Method Summary
 ContourLevels getContourLevels()
          Returns the contour levels.
 boolean isLabeling()
          Indicates whether or not contour-line labeling is enabled.
 void setContourLevels(ContourLevels contourLevels)
          Sets the contour values.
protected  void setControl()
          Sets the control of the underlying ScalarMap.
 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTOUR_LEVELS

public static final String CONTOUR_LEVELS
The name of the "contour levels" property.

See Also:
Constant Field Values

LABELING

public static final String LABELING
The name of the "labeling" property.

See Also:
Constant Field Values
Constructor Detail

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 Detail

setLabeling

public final void setLabeling(boolean on)
                       throws VisADException,
                              RemoteException
Sets the labeling of contour lines. This method fires a PropertyChangeEvent for LABELING 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

public void setRange(float min,
                     float max)
              throws RemoteException,
                     VisADException
Sets the range of data to be contoured.

Parameters:
min - The minimum, possible data value to be considered
max - 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 a PropertyChangeEvent for CONTOUR_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:
CONTOUR_LEVELS

getContourLevels

public final ContourLevels getContourLevels()
Returns the contour levels.

Returns:
The Contour levels. The initial value is an empty set of levels.

setControl

protected void setControl()
                   throws VisADException,
                          RemoteException
Sets the control of the underlying ScalarMap. This is a template method.

Specified by:
setControl in class ScalarMapAdapter
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.