visad
Class ContourControl

java.lang.Object
  extended by visad.Control
      extended by visad.ContourControl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ContourControl
extends Control

ContourControl is the VisAD class for controlling IsoContour display scalars.

See Also:
Serialized Form

Constructor Summary
ContourControl(DisplayImpl d)
          Construct a new ContourControl for the display
 
Method Summary
 java.lang.Object clone()
           
 boolean contourFilled()
           
 void enableContours(boolean on)
          set contour enable to 'on'
 void enableLabels(boolean on)
          set label enable to 'on'
 boolean equals(java.lang.Object o)
           
 float[] getLevels(float[] lowhibase, boolean[] dashes)
          get 'new' descriptors for 2-D contour lines; lowhibase must be float[3], dashes must be boolean[1]
 void getMainContours(boolean[] bvalues, float[] fvalues)
          get contour parameters: bvalues[0] = contour enable, bvalues[1] = labels enable, fvalues[0] = surface level, fvalues[1] = interval, fvalues[2] = low, fvalues[3] = hi, fvalues[4] = base; bvalues and fvalues must be passed in as boolean[2] and float[5]
 java.lang.String getSaveString()
          get a string that can be used to reconstruct this control later
 void setContourFill(boolean flag)
           
 void setContourInterval(float interval, float low, float hi, float ba)
          Sets the parameters for contour iso-lines.
 void setContourLimits(float low, float hi)
          Set low and high iso-line levels
 void setLevels(float[] levels, float base, boolean dash)
          Set arbitrary levels for 2-D contour lines; levels below base are dashed if dash == true
 void setSaveString(java.lang.String save)
          reconstruct this control using the specified save string
 void setSurfaceValue(float value)
          Set level for iso-surfaces
 void syncControl(Control rmt)
          copy the state of a remote control to this control
 
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContourControl

public ContourControl(DisplayImpl d)
Construct a new ContourControl for the display

Parameters:
d - Display to associate with this
Method Detail

setSurfaceValue

public void setSurfaceValue(float value)
                     throws VisADException,
                            java.rmi.RemoteException
Set level for iso-surfaces

Parameters:
value - value of the iso-surface to display
Throws:
VisADException - VisAD error
java.rmi.RemoteException - Java RMI failure.

setContourInterval

public void setContourInterval(float interval,
                               float low,
                               float hi,
                               float ba)
                        throws VisADException,
                               java.rmi.RemoteException
Sets the parameters for contour iso-lines. This method invokes the ControlListener.controlChanged(ControlEvent) method of all registered listeners;

Parameters:
interval - The contour interval. Must be non-zero. If negative, then contour lines below the base will be dashed. Must not be NaN.
low - The minimum contour value. No contour line less than this value will be drawn. Must not be NaN.
hi - The maximum contour value. No contour line greater than this value will be drawn. Must not be NaN.
ba - The base contour value. The contour lines will be integer multiples of the interval away from this value. Must not be NaN.
Throws:
VisADException - The interval is zero or too small.
java.rmi.RemoteException - Java RMI failure.

setContourLimits

public void setContourLimits(float low,
                             float hi)
                      throws VisADException,
                             java.rmi.RemoteException
Set low and high iso-line levels

Parameters:
low - The minimum contour value. No contour line less than this value will be drawn. Must not be NaN.
hi - The maximum contour value. No contour line greater than this value will be drawn. Must not be NaN.
Throws:
VisADException - VisAD error
java.rmi.RemoteException - Java RMI failure.

setLevels

public void setLevels(float[] levels,
                      float base,
                      boolean dash)
               throws VisADException,
                      java.rmi.RemoteException
Set arbitrary levels for 2-D contour lines; levels below base are dashed if dash == true

Parameters:
levels - An array of contour values to display.
base - The base contour value for dashing. Levels below base are dashed if dash is true
dash - flag for making dashed contours below the base contour value.
Throws:
VisADException - VisAD error
java.rmi.RemoteException - Java RMI failure.

getLevels

public float[] getLevels(float[] lowhibase,
                         boolean[] dashes)
get 'new' descriptors for 2-D contour lines; lowhibase must be float[3], dashes must be boolean[1]


enableLabels

public void enableLabels(boolean on)
                  throws VisADException,
                         java.rmi.RemoteException
set label enable to 'on'

Throws:
VisADException
java.rmi.RemoteException

enableContours

public void enableContours(boolean on)
                    throws VisADException,
                           java.rmi.RemoteException
set contour enable to 'on'

Throws:
VisADException
java.rmi.RemoteException

getMainContours

public void getMainContours(boolean[] bvalues,
                            float[] fvalues)
                     throws VisADException
get contour parameters: bvalues[0] = contour enable, bvalues[1] = labels enable, fvalues[0] = surface level, fvalues[1] = interval, fvalues[2] = low, fvalues[3] = hi, fvalues[4] = base; bvalues and fvalues must be passed in as boolean[2] and float[5]

Throws:
VisADException

setContourFill

public void setContourFill(boolean flag)
                    throws VisADException,
                           java.rmi.RemoteException
Throws:
VisADException
java.rmi.RemoteException

contourFilled

public boolean contourFilled()

getSaveString

public java.lang.String getSaveString()
get a string that can be used to reconstruct this control later

Specified by:
getSaveString in class Control

setSaveString

public void setSaveString(java.lang.String save)
                   throws VisADException,
                          java.rmi.RemoteException
reconstruct this control using the specified save string

Specified by:
setSaveString in class Control
Throws:
VisADException
java.rmi.RemoteException

syncControl

public void syncControl(Control rmt)
                 throws VisADException
copy the state of a remote control to this control

Specified by:
syncControl in class Control
Throws:
VisADException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class Control

clone

public java.lang.Object clone()
Overrides:
clone in class Control