public class AnimationControlJ3D extends AVControlJ3D implements AnimationControl
WLH - manipulate a list of Switch nodes in scene graph.
AVControlJ3D.SwitchSet
Modifier and Type | Field and Description |
---|---|
protected int |
current |
Constructor and Description |
---|
AnimationControlJ3D(DisplayImplJ3D d,
RealType r) |
Modifier and Type | Method and Description |
---|---|
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() |
boolean |
getDirection()
Get the animation direction.
|
boolean |
getOn()
return true if automatic stepping is on
|
RealType |
getRealType() |
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 |
run()
Start animating.
|
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 time for all steps
|
void |
setSteps(int[] steps)
set the dwell time for individual steps.
|
void |
stop()
Stop animating.
|
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
|
addPair, addPair, clearSwitches, getSwitches, nullControl, selectSwitches, setInterval
addControlListener, animation_string, changeControl, checkTicks, clone, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, peekTicks, removeControlListener, resetTicks, setTicks, toString
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addControlListener, clearSwitches, removeControlListener
public AnimationControlJ3D(DisplayImplJ3D d, RealType r)
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 numberVisADException
- - a VisAD error occurredRemoteException
- - 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 numberVisADException
- - a VisAD error occurredRemoteException
- - an RMI error occurredpublic void setDirection(boolean dir) throws VisADException, RemoteException
setDirection
in interface AnimationControl
dir
- true for forward, false for backwardVisADException
- 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 millisecondsVisADException
- 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
init
in class AVControlJ3D
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.setRangeVisADException
- 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 offVisADException
- 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 RealType getRealType()
public 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-transformpublic 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-transformpublic 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 reconstructionVisADException
- if a VisAD error occursRemoteException
- if an RMI error occurspublic void syncControl(Control rmt) throws VisADException
syncControl
in class Control
rmt
- remote Control whose state is copiedVisADException
- if a VisAD error occurspublic boolean equals(Object o)
Control
equals
in class AVControlJ3D
o
- an Objectpublic 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
public void stop()
stop
in interface AnimationControl
public void run()
run
in interface AnimationControl
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.