visad
Class AnimationSetControl

java.lang.Object
  extended by visad.Control
      extended by visad.AnimationSetControl
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
AnimationSetControlJ2D

public class AnimationSetControl
extends Control

AnimationSetControl is the VisAD class for sampling Animation steps.

See Also:
Serialized Form

Constructor Summary
AnimationSetControl(DisplayImpl d, AnimationControl p)
          construct an AnimationSetControl for the given DisplayImpl and AnimationControl
 
Method Summary
 int clipCurrent(int current)
           
 boolean equals(Object o)
          Indicates whether or not this instance equals an Object
 int getIndex(double value)
           
 String getSaveString()
           
 Set getSet()
           
 double getValue(int current)
           
 void setSaveString(String save)
          reconstruct this AnimationSetControl using the specified save string
 void setSet(Set s)
          set Set of Animation value
 void setSet(Set s, boolean noChange)
          set Set of Animation value
 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, clone, 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

AnimationSetControl

public AnimationSetControl(DisplayImpl d,
                           AnimationControl p)
construct an AnimationSetControl for the given DisplayImpl and AnimationControl

Parameters:
d - - DisplayImpl this AnimationSetControl is associated with
p - - parent AnimationControl of this AnimationSetControl
Method Detail

getSet

public Set getSet()
Returns:
Set of RealType values for animation steps, in RealType mapped to Animation

clipCurrent

public int clipCurrent(int current)
                throws VisADException
Parameters:
current - value to clip
Returns:
value of current clipped to limits defined by this AnimationSetControl
Throws:
VisADException - if a VisAD error occurs

getValue

public double getValue(int current)
                throws VisADException
Parameters:
current - index of current step
Returns:
current step converted to value of RealType mapped to Animation
Throws:
VisADException - if a VisAD error occurs

getIndex

public int getIndex(double value)
             throws VisADException
Parameters:
value - - RealType value
Returns:
animation step ordinal corresponding to value of RealType mapped to Animation
Throws:
VisADException - if a VisAD error occurs

setSet

public void setSet(Set s)
            throws VisADException,
                   RemoteException
set Set of Animation value

Parameters:
s - - Set of RealType values for Animation steps
Throws:
VisADException - if a VisAD error occurs
RemoteException - if an RMI error occurs

setSet

public void setSet(Set s,
                   boolean noChange)
            throws VisADException,
                   RemoteException
set Set of Animation value

Parameters:
s - - Set of RealType values for Animation steps
noChange - = true to not trigger changeControl (used by ScalarMap.setRange())
Throws:
VisADException - if a VisAD error occurs
RemoteException - if an RMI error occurs

getSaveString

public String getSaveString()
Specified by:
getSaveString in class Control
Returns:
String representation of this AnimationSetControl

setSaveString

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

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 Control
Parameters:
o - - Object tested for equality with this
Returns:
true if o is identical with this