|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.Control visad.java2d.AVControlJ2D visad.java2d.AnimationControlJ2D
public class AnimationControlJ2D
AnimationControlJ2D is the VisAD class for controlling Animation display scalars under Java2D.
WLH - manipulate a list of VisADSwitch nodes in scene graph.
Constructor Summary | |
---|---|
AnimationControlJ2D(DisplayImplJ2D d,
RealType r)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
Indicates whether or not this instance equals an Object |
boolean |
getComputeSet()
Get the flag to automatically compute the animation set if it is null |
int |
getCurrent()
get the current ordinal step number |
boolean |
getDirection()
Get the animation direction. |
boolean |
getOn()
return true if automatic stepping is on |
String |
getSaveString()
get a String that can be used to reconstruct this AnimationControl later |
Set |
getSet()
|
long |
getStep()
Return the dwell time for the current step |
long[] |
getSteps()
return an array of the dwell times for all the steps. |
void |
init()
actually set Switches (Java3D) or VisADSwitches (Java2D) to child nodes corresponding to current ordinal step number |
void |
nullControl()
end this control (called by ScalarMap.nullDisplay()) |
void |
run()
a single invocation implements anmation behavior until stop() is called |
void |
setComputeSet(boolean compute)
Set the flag to automatically compute the animation set if it is null |
void |
setCurrent(double value)
set the current step by the value of the RealType mapped to Display.Animation |
void |
setCurrent(int c)
set the current ordinal step number = c |
void |
setDirection(boolean dir)
Set the animation direction. |
void |
setOn(boolean o)
Set automatic stepping on or off. |
void |
setSaveString(String save)
reconstruct this AnimationControl using the specified save string |
void |
setSet(Set s)
Sets the set of times in this animation control. |
void |
setSet(Set s,
boolean noChange)
Sets the set of times in this animation control. |
void |
setStep(int st)
Set the dwell rate between animation steps to a constant value |
void |
setSteps(int[] steps)
set the dwell time for individual steps. |
void |
stop()
stop activity in this AnimationControl |
boolean |
subCheckTicks(DataRenderer r,
DataDisplayLink link)
run checkTicks on any sub-Controls this default for no sub-Controls |
boolean |
subPeekTicks(DataRenderer r,
DataDisplayLink link)
run peekTicks on any sub-Controls this default for no sub-Controls |
void |
subResetTicks()
run resetTicks on any sub-Controls this default for no sub-Controls |
void |
subSetTicks()
run setTicks on any sub-Controls; this default for no sub-Controls |
void |
syncControl(Control rmt)
copy the state of a remote control to this control |
void |
takeStep()
advance one step (forward or backward) |
void |
toggle()
toggle automatic stepping between off and on |
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, peekTicks, removeControlListener, resetTicks, setTicks |
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 |
---|
public AnimationControlJ2D(DisplayImplJ2D d, RealType r)
Method Detail |
---|
public void nullControl()
Control
nullControl
in class Control
public void stop()
AnimationControl
stop
in interface AnimationControl
public void run()
AnimationControl
run
in interface Runnable
run
in interface AnimationControl
public int getCurrent()
getCurrent
in interface AnimationControl
public void setCurrent(int c) throws VisADException, RemoteException
setCurrent
in interface AnimationControl
c
- - value for current ordinal step number
VisADException
- - a VisAD error occurred
RemoteException
- - an RMI error occurredpublic void setCurrent(double value) throws VisADException, RemoteException
setCurrent
in interface AnimationControl
value
- - RealType value that is converted to an
ordinal step number
VisADException
- - a VisAD error occurred
RemoteException
- - an RMI error occurredpublic void setDirection(boolean dir) throws VisADException, RemoteException
setDirection
in interface AnimationControl
dir
- true for forward, false for backward
VisADException
- Couldn't create necessary VisAD object. The
direction remains unchanged.
RemoteException
- Java RMI exceptionpublic boolean getDirection()
getDirection
in interface AnimationControl
public long getStep()
getStep
in interface AnimationControl
public long[] getSteps()
getSteps
in interface AnimationControl
public void setStep(int st) throws VisADException, RemoteException
setStep
in interface AnimationControl
st
- dwell time in milliseconds
VisADException
- Couldn't create necessary VisAD object. The
dwell time remains unchanged.
RemoteException
- Java RMI exceptionpublic void setSteps(int[] steps) throws VisADException, RemoteException
setSteps
in interface AnimationControl
steps
- an array of dwell rates 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.
VisADException
- Couldn't create necessary VisAD object. The
dwell times remain unchanged.
RemoteException
- Java RMI exceptionpublic void takeStep() throws VisADException, RemoteException
takeStep
in interface AnimationControl
VisADException
- Couldn't create necessary VisAD object. No
step is taken.
RemoteException
- Java RMI exceptionpublic void init() throws VisADException
AnimationControl
init
in interface AnimationControl
VisADException
- - a VisAD error occurred.public Set getSet()
getSet
in interface AnimationControl
public void setSet(Set s) throws VisADException, RemoteException
Sets the set of times in this animation control. If the argument set is equal to the current set, then nothing is done.
setSet
in interface AnimationControl
s
- The set of times.
VisADException
- if a VisAD failure occurs.
RemoteException
- if a Java RMI failure occurs.public void setSet(Set s, boolean noChange) throws VisADException, RemoteException
Sets the set of times in this animation control. If the argument set is equal to the current set, then nothing is done.
setSet
in interface AnimationControl
s
- The set of times.noChange
- changeControl(!noChange) to not trigger
re-transform, used by ScalarMap.setRange
VisADException
- if a VisAD failure occurs.
RemoteException
- if a Java RMI failure occurs.public boolean getOn()
getOn
in interface AnimationControl
public void setOn(boolean o) throws VisADException, RemoteException
setOn
in interface AnimationControl
o
- true = turn stepping on, false = turn stepping off
VisADException
- Couldn't create necessary VisAD object. No
change in automatic stepping occurs.
RemoteException
- Java RMI exceptionpublic void toggle() throws VisADException, RemoteException
toggle
in interface AnimationControl
VisADException
- Couldn't create necessary VisAD object. No
change in automatic stepping occurs.
RemoteException
- Java RMI exceptionpublic void subSetTicks()
Control
subSetTicks
in class Control
public boolean subCheckTicks(DataRenderer r, DataDisplayLink link)
Control
subCheckTicks
in class Control
r
- DataRenderer to check if changes to this Control
require re-transformlink
- DataDisplayLink involved in decision whether
changes to this Control require re-transform
public boolean subPeekTicks(DataRenderer r, DataDisplayLink link)
Control
subPeekTicks
in class Control
r
- DataRenderer to check if changes to this Control
require re-transformlink
- DataDisplayLink involved in decision whether
changes to this Control require re-transform
public void subResetTicks()
Control
subResetTicks
in class Control
public String getSaveString()
getSaveString
in interface AVControl
getSaveString
in class Control
public void setSaveString(String save) throws VisADException, RemoteException
setSaveString
in interface AVControl
setSaveString
in class Control
save
- - String representation for reconstruction
VisADException
- if a VisAD error occurs
RemoteException
- if an RMI error occurspublic void syncControl(Control rmt) throws VisADException
syncControl
in class Control
rmt
- remote Control whose state is copied
VisADException
- if a VisAD error occurspublic boolean equals(Object o)
Control
equals
in class AVControlJ2D
o
- an Object
public String toString()
toString
in class Control
public void setComputeSet(boolean compute)
setComputeSet
in interface AnimationControl
compute
- false to allow application to control set computation
if set is null.public boolean getComputeSet()
getComputeSet
in interface AnimationControl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |