|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.display.Displayable
ucar.visad.display.Animation
public class Animation
Provides support for a Displayable that needs a map to
Display.Animation
| Field Summary | |
|---|---|
static String |
ANI_REAL_TYPE
The name of the animation real-type property. |
static String |
ANI_SET
The name of the set-of-times property. |
static String |
ANI_VALUE
The name of the current time property. |
static int |
FORWARD
The "forward" animation value. |
static int |
REVERSE
The "reverse" animation value. |
| Fields inherited from class ucar.visad.display.Displayable |
|---|
DISPLAY, parent, SCALAR_MAP_SET |
| Constructor Summary | |
|---|---|
|
Animation()
Constructs from nothing. |
protected |
Animation(Animation that)
Construct a new Animation from another one |
|
Animation(RealType aniRealType)
Constructs from the type of the VisAD parameter to animate over, typically RealType.Time. |
| Method Summary | |
|---|---|
Displayable |
cloneForDisplay()
Returns a clone of this instance suitable for another VisAD display. |
boolean |
equals(Object obj)
Checks the equality of this Animation with the object in question. |
protected void |
finalize()
Method called when class is destroyed |
AnimationInfo |
getAnimationInfo()
Get the AnimationInfo associated with this Animation. |
RealType |
getAnimationRealType()
Returns the RealType of the Animation parameter. |
Real |
getAniValue()
Returns the value of the "aniValue" property. |
long[] |
getBackSteps()
Returns an array of the backward dwell times for all the steps in integer milliseconds. |
int |
getCurrent()
Returns the origin-0 index of the current time being shown. |
Real |
getCurrentAnimationValue()
|
static DateTime[] |
getDateTimeArray(Set timeSet)
Utility to create an array of DateTime from the given time set |
boolean |
getEnabled()
Get the Enabled property. |
long[] |
getFwdSteps()
Returns an array of the dwell times for all the steps in integer milliseconds. |
int |
getNumSteps()
Returns the number of time steps |
Set |
getSet()
Returns the set of animation time-values. |
long[] |
getSteps()
Deprecated. Use getFwdSteps |
DateTime[] |
getTimes()
|
boolean |
isAnimating()
Indicates if looping is on. |
void |
myAddDataReferences()
Adds the DataReferences associated with this instance
to the display. |
void |
myRemoveDataReferences()
Removes the DataReferences associated with this
instance from the display. |
void |
reCalculateAnimationSet()
Force recalculation of animation time steps based on all data with domains mapped to this Animation's RealType. |
void |
setAnimating(boolean on)
Begin animating or looping. |
void |
setAnimationInfo(AnimationInfo ai)
Explicitly sets the animation parameters of this instance. |
void |
setAnimationRealType(RealType realType)
Sets the RealType of the VisAD Animation parameter,
such as RealType.Time. |
void |
setAniValue(Real newTime)
Sets the current time being shown to the value of the Real. |
void |
setBackSteps(long[] newTimes)
Sets an integer array in milliseconds of time delay AFTER display each loop step when animating backward. |
void |
setCurrent(int newIndex)
Sets the current time being shown. |
void |
setCurrent(int newIndex,
boolean checkUserFrames)
Sets the current time being shown. |
void |
setDirection(int direction)
Set looping direction. |
void |
setEnabled(boolean value)
Set the Enabled property. |
void |
setFwdSteps(long[] newTimes)
Sets an integer array in milliseconds of time delay AFTER display each loop step. |
void |
setSet(Set newSet)
Sets the animation times for this instance to use. |
void |
setSet(Set newSet,
boolean transform)
Sets the animation times for this instance to use. |
void |
setSteps(long[] newTimes)
Deprecated. Use setFwdSteps |
void |
setStepsOk(boolean[] stepsOk)
Set the steps ok. |
boolean |
shouldBeAnimating()
Indicates if looping is on. |
boolean |
shouldShow(Real timeValue)
Check if the animationSet.valueToIndex of the given time value is equals to the current time step. |
void |
takeStep()
Step one time in the current direction (foward or reverse). |
void |
takeStep(int direction)
Step one time in whatever direction is specified. |
void |
takeStepBackward()
Step one time backward. |
void |
takeStepForward()
Step one time forward. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ANI_REAL_TYPE
public static final String ANI_VALUE
public static final String ANI_SET
public static final int FORWARD
public static final int REVERSE
| Constructor Detail |
|---|
public Animation()
throws VisADException,
RemoteException
RealType.Time for the
animation RealType.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public Animation(RealType aniRealType)
throws VisADException,
RemoteException
RealType.Time.
aniRealType - The type of the animation parameter or
null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected Animation(Animation that)
throws VisADException,
RemoteException
that - the other Animation object
RemoteException - Java RMI failure
VisADException - VisAD failure| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
public void setAnimationRealType(RealType realType)
throws RemoteException,
VisADException
RealType of the VisAD Animation parameter,
such as RealType.Time.
realType - The RealType of the animation
parameter.
NullPointerException - if realType is
null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public RealType getAnimationRealType()
null.public final Real getAniValue()
null
if no such value exists.
null.
public Displayable cloneForDisplay()
throws RemoteException,
VisADException
cloneForDisplay in class DisplayableVisADException - VisAD failure.
RemoteException - Java RMI failure.public final void myAddDataReferences()
Adds the DataReferences associated with this instance
to the display.
This implementation does nothing.
myAddDataReferences in class Displayablepublic final void myRemoveDataReferences()
Removes the DataReferences associated with this
instance from the display.
This implementation does nothing.
myRemoveDataReferences in class Displayable
public void setAnimationInfo(AnimationInfo ai)
throws RemoteException,
VisADException
ai - The animation parameters.
NullPointerException - if the argument is null.
RemoteException - Java RMI error
VisADException - VisADErrorpublic AnimationInfo getAnimationInfo()
AnimationInfo associated with this Animation.
public void setAnimating(boolean on)
on - Whether or not looping should be on.
public boolean shouldShow(Real timeValue)
throws VisADException,
RemoteException
timeValue - The time value to check
VisADException
RemoteExceptionpublic boolean isAnimating()
public boolean shouldBeAnimating()
public Set getSet()
public void setSet(Set newSet)
throws VisADException,
RemoteException
newSet - New animation times.
VisADException - if the set isn't 1-D or doesn't have the same
RealType as the animation ScalarMap.
RemoteException - if a Java RMI failure occurs.public Real getCurrentAnimationValue()
public DateTime[] getTimes()
public void setSet(Set newSet,
boolean transform)
throws VisADException,
RemoteException
newSet - New animation times.transform - true to transform
VisADException - if the set isn't 1-D or doesn't have the same
RealType as the animation ScalarMap.
RemoteException - if a Java RMI failure occurs.public long[] getSteps()
null if no such times exist;
otherwise, each time value is the delay AFTER each loop step: the first
time in list is time delay AFTER the display of the first data.
null.public void setSteps(long[] newTimes)
newTimes - Dwell delays in milliseconds.public long[] getFwdSteps()
null if no such times exist;
otherwise, each time value is the delay AFTER each loop step: the first
time in list is time delay AFTER the display of the first data.
null.public void setFwdSteps(long[] newTimes)
newTimes - Dwell delays in milliseconds.public long[] getBackSteps()
null if no such times exist;
otherwise, each time value is the delay AFTER each loop step: the first
time in list is time delay AFTER the display of the first data.
null.public void setBackSteps(long[] newTimes)
newTimes - Dwell delays in milliseconds.public int getNumSteps()
public int getCurrent()
public void setAniValue(Real newTime)
newTime - Real of the newTime.public void setCurrent(int newIndex)
newIndex - The origin-0 index of the desired time.
public void setCurrent(int newIndex,
boolean checkUserFrames)
newIndex - The origin-0 index of the desired time.checkUserFrames - If true then go to the next "on" frame.public void takeStep()
public void takeStep(int direction)
direction - an int (0=FORWARD, 1=REVERSE)
public void setStepsOk(boolean[] stepsOk)
throws RemoteException,
VisADException
stepsOk - What steps are ok
RemoteException - On badness
VisADException - On badnesspublic void setDirection(int direction)
direction - an int, 0 = FORWARD, 1 = REVERSEpublic void takeStepForward()
public void takeStepBackward()
public void reCalculateAnimationSet()
RealType.
public boolean equals(Object obj)
equals in class Objectobj - The object to check. Animations are equal if
their AnimationControls and RealTypes are equal.
public static DateTime[] getDateTimeArray(Set timeSet)
timeSet - The time set
public void setEnabled(boolean value)
value - The new value for Enabledpublic boolean getEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||