visad.java2d
Class ValueControlJ2D

java.lang.Object
  extended by visad.Control
      extended by visad.java2d.AVControlJ2D
          extended by visad.java2d.ValueControlJ2D
All Implemented Interfaces:
Serializable, Cloneable, AVControl, ValueControl

public class ValueControlJ2D
extends AVControlJ2D
implements ValueControl

ValueControlJ2D is the VisAD class for controlling SelectValue display scalars under Java2D.

See Also:
Serialized Form

Constructor Summary
ValueControlJ2D(DisplayImplJ2D d)
           
 
Method Summary
 boolean equals(Object o)
          Indicates whether or not this instance equals an Object
 String getSaveString()
          get a String that can be used to reconstruct this ValueControl later
 double getValue()
          return the selected value
 void init()
           
 void setSaveString(String save)
          reconstruct this ValueControl using the specified save string
 void setValue(double value)
          set the selected value
 void syncControl(Control rmt)
          copy the state of a remote control to this control
 String toString()
           
 
Methods inherited from class visad.java2d.AVControlJ2D
clearSwitches, selectSwitches
 
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, clone, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface visad.AVControl
addControlListener, clearSwitches, removeControlListener
 

Constructor Detail

ValueControlJ2D

public ValueControlJ2D(DisplayImplJ2D d)
Method Detail

setValue

public void setValue(double value)
              throws VisADException,
                     RemoteException
Description copied from interface: ValueControl
set the selected value

Specified by:
setValue in interface ValueControl
Throws:
VisADException
RemoteException

init

public void init()
          throws VisADException
Specified by:
init in interface ValueControl
Throws:
VisADException

getValue

public double getValue()
Description copied from interface: ValueControl
return the selected value

Specified by:
getValue in interface ValueControl

getSaveString

public String getSaveString()
get a String that can be used to reconstruct this ValueControl later

Specified by:
getSaveString in interface AVControl
Specified by:
getSaveString in class Control
Returns:
String representation of this Control

setSaveString

public void setSaveString(String save)
                   throws VisADException,
                          RemoteException
reconstruct this ValueControl using the specified save string

Specified by:
setSaveString in interface AVControl
Specified by:
setSaveString in class Control
Parameters:
save - - String representation for reconstruction
Throws:
VisADException - if a VisAD error occurs
RemoteException - if an RMI error occurs

syncControl

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

Specified by:
syncControl in class Control
Parameters:
rmt - remote Control whose state is copied
Throws:
VisADException - if a VisAD error occurs

equals

public boolean equals(Object o)
Description copied from class: Control
Indicates whether or not this instance equals an Object

Overrides:
equals in class AVControlJ2D
Parameters:
o - an Object
Returns:
true if and only if this instance is equal to o

toString

public String toString()
Overrides:
toString in class Control
Returns:
a simple String representation of this Control