Package ucar.visad.display
Class AnimationInfo
java.lang.Object
ucar.visad.display.AnimationInfo
A class to hold and transfer animation properties settings, as to and
from the AnimationPropertiesDialog.
- fwdspeed controls speed of looping forward (seconds/frame) = how long each frame is seen when looping forwards, except first and last frame.
- backspeed controls speed of looping backwards (seconds/frame)= how long each frame is seen when looping reverse, except first and last frame.
- startdwell = how long first frame is seen;
- enddwell = how long last frame is seen;
- direction is the loop going forwards or backwards, true = forwards in time;
- rocking is true if rocking on - looping in both directions, back and forth.
- shared is true if state should be shared with other animation widgets
- Version:
- $Revision: 1.34 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringanimation groupprotected floatbackward speedprotected booleanAre boxes visibleprotected booleandirection of loopingprotected floatending dwell rateprotected floatforward speedstatic final StringEnum for reset propertystatic final StringEnum for reset propertystatic final StringEnum for reset propertyprotected StringWhen getting a new animation this determines the reset policyprotected booleanflag for rockingprotected booleanflag for sharingprotected floatstarting dwell rate -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an object to hold and transfer animation properties settings.AnimationInfo(float fwdSpeed, float backSpeed, float startDwell, float endDwell, boolean direction, boolean rocking) Construct an object to hold and transfer animation properties settings, with values supplied.AnimationInfo(float fwdSpeed, float backSpeed, float startDwell, float endDwell, boolean direction, boolean rocking, boolean shared) Construct an object to hold and transfer animation properties settings, with values supplied. -
Method Summary
Modifier and TypeMethodDescriptionGet the AnimationGroup property.Get the AnimationSetInfo property.floatGet the BackSpeed property.booleanGet the BoxesVisible property.booleanGet the Direction property.floatGet the EndDwell property.floatGet the FwdSpeed property.Get the ResetPolicy property.booleanGet the Rocking property.booleanGet the Running property.booleanGet the Shared property.booleanGet the ShareIndex property.floatGet the StartDwell property.booleanShould we reset to the startbooleanNo resetbooleanShould we reset to the endvoidset(AnimationInfo that) Set the state of thie AnimationInfo from the state of another.voidsetAnimationGroup(String value) Set the AnimationGroup property.voidSet the AnimationSetInfo property.voidsetBackSpeed(float value) Set the BackSpeed property.voidsetBoxesVisible(boolean value) Set the BoxesVisible property.voidsetDirection(boolean value) Set the Direction property.voidsetEndDwell(float value) Set the EndDwell property.voidsetFwdSpeed(float value) Set the FwdSpeed property.voidsetResetPolicy(String value) Set the ResetPolicy property.voidsetRocking(boolean value) Set the Rocking property.voidsetRunning(boolean value) Set the Running property.voidsetShared(boolean value) Set the Shared property.voidsetShareIndex(boolean value) Set the ShareIndex property.voidsetStartDwell(float value) Set the StartDwell property.toString()String representation of this object.
-
Field Details
-
RESET_BEGINNING
Enum for reset property- See Also:
-
RESET_CURRENT
Enum for reset property- See Also:
-
RESET_END
Enum for reset property- See Also:
-
resetPolicy
When getting a new animation this determines the reset policy -
boxesVisible
protected boolean boxesVisibleAre boxes visible -
fwdSpeed
protected float fwdSpeedforward speed -
backSpeed
protected float backSpeedbackward speed -
startDwell
protected float startDwellstarting dwell rate -
endDwell
protected float endDwellending dwell rate -
direction
protected boolean directiondirection of looping -
rocking
protected boolean rockingflag for rocking -
animationGroup
animation group
-
-
Constructor Details
-
AnimationInfo
public AnimationInfo()Construct an object to hold and transfer animation properties settings. Set initial values in seconds which user can change later. -
AnimationInfo
public AnimationInfo(float fwdSpeed, float backSpeed, float startDwell, float endDwell, boolean direction, boolean rocking) Construct an object to hold and transfer animation properties settings, with values supplied.- Parameters:
fwdSpeed- controls speed of looping forward (seconds/frame)backSpeed- controls speed of looping backwards (seconds/frame)startDwell- duration of pause at start of loop (seconds)endDwell- duration of pause at end of loop (seconds)direction- is the loop going forwards or backwardsrocking- is rocking on - looping in both directions
-
AnimationInfo
public AnimationInfo(float fwdSpeed, float backSpeed, float startDwell, float endDwell, boolean direction, boolean rocking, boolean shared) Construct an object to hold and transfer animation properties settings, with values supplied.- Parameters:
fwdSpeed- controls speed of looping forward (seconds/frame)backSpeed- controls speed of looping backwards (seconds/frame)startDwell- duration of pause at start of loop (seconds)endDwell- duration of pause at end of loop (seconds)direction- is the loop going forwards or backwardsrocking- true if rocking on - looping in both directionsshared- true if state is to be shared
-
-
Method Details
-
set
Set the state of thie AnimationInfo from the state of another.- Parameters:
that- other AnimationInfo
-
toString
String representation of this object. -
setRocking
public void setRocking(boolean value) Set the Rocking property.- Parameters:
value- The new value for Rocking
-
getRocking
public boolean getRocking()Get the Rocking property.- Returns:
- The Rocking
-
setDirection
public void setDirection(boolean value) Set the Direction property.- Parameters:
value- The new value for Direction
-
getDirection
public boolean getDirection()Get the Direction property.- Returns:
- The Direction
-
setFwdSpeed
public void setFwdSpeed(float value) Set the FwdSpeed property.- Parameters:
value- The new value for FwdSpeed
-
getFwdSpeed
public float getFwdSpeed()Get the FwdSpeed property.- Returns:
- The FwdSpeed
-
setBackSpeed
public void setBackSpeed(float value) Set the BackSpeed property.- Parameters:
value- The new value for BackSpeed
-
getBackSpeed
public float getBackSpeed()Get the BackSpeed property.- Returns:
- The BackSpeed
-
setStartDwell
public void setStartDwell(float value) Set the StartDwell property.- Parameters:
value- The new value for StartDwell
-
getStartDwell
public float getStartDwell()Get the StartDwell property.- Returns:
- The StartDwell
-
setEndDwell
public void setEndDwell(float value) Set the EndDwell property.- Parameters:
value- The new value for EndDwell
-
getEndDwell
public float getEndDwell()Get the EndDwell property.- Returns:
- The EndDwell
-
setResetPolicy
Set the ResetPolicy property.- Parameters:
value- The new value for ResetPolicy
-
getResetPolicy
Get the ResetPolicy property.- Returns:
- The ResetPolicy
-
resetToEnd
public boolean resetToEnd()Should we reset to the end- Returns:
- Reset to the end
-
resetToCurrent
public boolean resetToCurrent()No reset- Returns:
- No reset
-
resetToBeginning
public boolean resetToBeginning()Should we reset to the start- Returns:
- Reset to the start
-
setBoxesVisible
public void setBoxesVisible(boolean value) Set the BoxesVisible property.- Parameters:
value- The new value for BoxesVisible
-
getBoxesVisible
public boolean getBoxesVisible()Get the BoxesVisible property.- Returns:
- The BoxesVisible
-
setAnimationGroup
Set the AnimationGroup property.- Parameters:
value- The new value for AnimationGroup
-
getAnimationGroup
Get the AnimationGroup property.- Returns:
- The AnimationGroup
-
setAnimationSetInfo
Set the AnimationSetInfo property.- Parameters:
value- The new value for AnimationSet
-
getAnimationSetInfo
Get the AnimationSetInfo property.- Returns:
- The AnimationSetInfo
-
setRunning
public void setRunning(boolean value) Set the Running property.- Parameters:
value- The new value for Running
-
getRunning
public boolean getRunning()Get the Running property.- Returns:
- The Running
-