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 String
animation groupprotected float
backward speedprotected boolean
Are boxes visibleprotected boolean
direction of loopingprotected float
ending dwell rateprotected float
forward speedstatic final String
Enum for reset propertystatic final String
Enum for reset propertystatic final String
Enum for reset propertyprotected String
When getting a new animation this determines the reset policyprotected boolean
flag for rockingprotected boolean
flag for sharingprotected float
starting 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.float
Get the BackSpeed property.boolean
Get the BoxesVisible property.boolean
Get the Direction property.float
Get the EndDwell property.float
Get the FwdSpeed property.Get the ResetPolicy property.boolean
Get the Rocking property.boolean
Get the Running property.boolean
Get the Shared property.boolean
Get the ShareIndex property.float
Get the StartDwell property.boolean
Should we reset to the startboolean
No resetboolean
Should we reset to the endvoid
set
(AnimationInfo that) Set the state of thie AnimationInfo from the state of another.void
setAnimationGroup
(String value) Set the AnimationGroup property.void
Set the AnimationSetInfo property.void
setBackSpeed
(float value) Set the BackSpeed property.void
setBoxesVisible
(boolean value) Set the BoxesVisible property.void
setDirection
(boolean value) Set the Direction property.void
setEndDwell
(float value) Set the EndDwell property.void
setFwdSpeed
(float value) Set the FwdSpeed property.void
setResetPolicy
(String value) Set the ResetPolicy property.void
setRocking
(boolean value) Set the Rocking property.void
setRunning
(boolean value) Set the Running property.void
setShared
(boolean value) Set the Shared property.void
setShareIndex
(boolean value) Set the ShareIndex property.void
setStartDwell
(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
-