visad
Interface AnimationControl
-
- All Superinterfaces:
- AVControl
- All Known Implementing Classes:
- AnimationControlJ2D, AnimationControlJ3D, DownRoundingAnimationControlJ3D
public interface AnimationControl extends AVControl
AnimationControl is the VisAD interface for controlling Animation display scalars. Current implementations also implement Runnable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleangetComputeSet()Get the flag to automatically compute the animation set if it is nullintgetCurrent()booleangetDirection()Get the animation direction.booleangetOn()SetgetSet()longgetStep()long[]getSteps()voidinit()actually set Switches (Java3D) or VisADSwitches (Java2D) to child nodes corresponding to current ordinal step numbervoidrun()a single invocation implements anmation behavior until stop() is calledvoidsetComputeSet(boolean compute)Set the flag to automatically compute the animation set if it is nullvoidsetCurrent(double value)set the current step by the value of the RealType mapped to Display.AnimationvoidsetCurrent(int c)set the current ordinal step numbervoidsetDirection(boolean dir)Set the animation direction.voidsetOn(boolean o)Set automatic stepping on or off.voidsetSet(Set s)Sets the set of times in this animation control, in RealType mapped to Animation.voidsetSet(Set s, boolean noChange)Sets the set of times in this animation control, in RealType mapped to Animation.voidsetStep(int st)Set the dwell rate between animation steps to a constant valuevoidsetSteps(int[] steps)set the dwell time for individual steps.voidstop()stop activity in this AnimationControlvoidtakeStep()advance one step (forward or backward)voidtoggle()toggle automatic stepping between off and on-
Methods inherited from interface visad.AVControl
addControlListener, clearSwitches, getSaveString, removeControlListener, setSaveString
-
-
-
-
Method Detail
-
stop
void stop()
stop activity in this AnimationControl
-
run
void run()
a single invocation implements anmation behavior until stop() is called
-
setCurrent
void setCurrent(int c) throws VisADException, java.rmi.RemoteExceptionset the current ordinal step number- Parameters:
c- - value for current ordinal step number- Throws:
VisADException- - a VisAD error occurredjava.rmi.RemoteException- - an RMI error occurred
-
setCurrent
void setCurrent(double value) throws VisADException, java.rmi.RemoteExceptionset the current step by the value of the RealType mapped to Display.Animation- Parameters:
value- - RealType value that is converted to an ordinal step number- Throws:
VisADException- - a VisAD error occurredjava.rmi.RemoteException- - an RMI error occurred
-
getCurrent
int getCurrent()
- Returns:
- the current ordinal step number
-
setDirection
void setDirection(boolean dir) throws VisADException, java.rmi.RemoteExceptionSet the animation direction.- Parameters:
dir- true for forward, false for backward- Throws:
VisADException- Couldn't create necessary VisAD object. The direction remains unchanged.java.rmi.RemoteException- Java RMI exception
-
getDirection
boolean getDirection()
Get the animation direction.- Returns:
- true for forward, false for backward
-
getStep
long getStep()
- Returns:
- the dwell time for the current step (in ms)
-
getSteps
long[] getSteps()
- Returns:
- an array of the dwell times for all the steps (in ms)
-
setStep
void setStep(int st) throws VisADException, java.rmi.RemoteExceptionSet the dwell rate between animation steps to a constant value- Parameters:
st- dwell time in milliseconds- Throws:
VisADException- Couldn't create necessary VisAD object. The dwell time remains unchanged.java.rmi.RemoteException- Java RMI exception
-
setSteps
void setSteps(int[] steps) throws VisADException, java.rmi.RemoteExceptionset the dwell time for individual steps.- Parameters:
steps- an array of dwell times in milliseconds for each step in the animation. If the length of the array is less than the number of frames in the animation, the subsequent step values will be set to the value of the last step.- Throws:
VisADException- Couldn't create necessary VisAD object. The dwell times remain unchanged.java.rmi.RemoteException- Java RMI exception
-
takeStep
void takeStep() throws VisADException, java.rmi.RemoteExceptionadvance one step (forward or backward)- Throws:
VisADException- Couldn't create necessary VisAD object. No step is taken.java.rmi.RemoteException- Java RMI exception
-
init
void init() throws VisADException
actually set Switches (Java3D) or VisADSwitches (Java2D) to child nodes corresponding to current ordinal step number- Throws:
VisADException- - a VisAD error occurred.
-
getSet
Set getSet()
- Returns:
- Set of RealType values for animation steps, in RealType mapped to Animation
-
setSet
void setSet(Set s) throws VisADException, java.rmi.RemoteException
Sets the set of times in this animation control, in RealType mapped to Animation. If the argument set is equal to the current set, then nothing is done.
- Parameters:
s- The set of times.- Throws:
VisADException- if a VisAD failure occurs.java.rmi.RemoteException- if a Java RMI failure occurs.
-
setSet
void setSet(Set s, boolean noChange) throws VisADException, java.rmi.RemoteException
Sets the set of times in this animation control, in RealType mapped to Animation. If the argument set is equal to the current set, then nothing is done.
- Parameters:
s- The set of times.noChange- changeControl(!noChange) to not trigger re-transform, used by ScalarMap.setRange- Throws:
VisADException- if a VisAD failure occurs.java.rmi.RemoteException- if a Java RMI failure occurs.
-
getOn
boolean getOn()
- Returns:
- true if automatic stepping is on, false otherwise
-
setOn
void setOn(boolean o) throws VisADException, java.rmi.RemoteExceptionSet automatic stepping on or off.- Parameters:
o- true = turn stepping on, false = turn stepping off- Throws:
VisADException- Couldn't create necessary VisAD object. No change in automatic stepping occurs.java.rmi.RemoteException- Java RMI exception
-
toggle
void toggle() throws VisADException, java.rmi.RemoteExceptiontoggle automatic stepping between off and on- Throws:
VisADException- Couldn't create necessary VisAD object. No change in automatic stepping occurs.java.rmi.RemoteException- Java RMI exception
-
setComputeSet
void setComputeSet(boolean compute)
Set the flag to automatically compute the animation set if it is null- Parameters:
compute- false to allow application to control set computation if set is null.
-
getComputeSet
boolean getComputeSet()
Get the flag to automatically compute the animation set if it is null- Returns:
- true if should compute
-
-
DMelt 3.0 © DataMelt by jWork.ORG