Class RMTransition
java.lang.Object
com.inductiveautomation.rm.graphics.RMTransition
- All Implemented Interfaces:
- Comparable<RMTransition>
- Direct Known Subclasses:
- RMTransition.Rotate,- RMTransition.Translate
An animation class that represents a change of an object property from one value to another.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classA transition for rotation.static enumstatic classA transition for XY.
- 
Constructor SummaryConstructorsConstructorDescriptionRMTransition(RMKeyValue aKeyVal1, RMKeyValue aKeyVal2) Creates a new transition.RMTransition(Object aTarget, String aKey, Object aValue, int aDuration, boolean isRelative) Creates a new transition.
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(RMTransition aTrans) Standard compare implementation.intReturns the number of cycles in animation.intgetDelay()Returns the delay of the transition from the time it is told to play to when transition starts.intReturns the duration plus delay.intReturns the duration of the transition in milliseconds.static ObjectgetInterpolation(double aFraction, Object aValue1, Object aValue2) Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.Returns the interpolator.getKey()Returns the key.intReturns the progress this transition has made since it was started, in milliseconds.doubleReturns the progress ratio for current progress.protected doublegetProgressRatio(int aProgress) Returns the progress ratio for a progress.Returns the run status of the transition.Returns the target.intReturns the total duration of the animation (delayed duration times cycle count).static RMTransitiongetTransition(Object aTarget, String aKey) Returns the transition for given target and key.Returns the first value.Returns the second value.booleanReturns whether the transition does an auto-reverse.booleanisPaused()Returns whether transition is paused.booleanReturns whether transition is running.static booleanisTransitioning(Object aTarget, String aKey) Returns whether transition is running for given target and key.voidpause()Pauses the animation.voidplay()Tells the transition to start playing.voidplayFrom(int aTime) Tells the transition to start playing at given time of transition duration (in milliseconds).voidTells the transition to start playing from the beginning.voidsetAutoReverse(boolean doAutoReverse) Sets whether the transition does an auto-reverse.voidsetCycleCount(int aCount) Sets the number of cycles in animation.voidsetDelay(int aDelay) Sets the delay of the transition from the time it is told to play to when transition starts.voidsetDuration(int aValue) Sets the duration of the transition in milliseconds.voidsetInterpolator(RMInterpolator anInterpolator) Sets the interpolator.protected voidsetProgress(int aProgress) Sets the progress this transition has made since it was started, in milliseconds.voidsetRunStatus(RMTransition.RunStatus aStatus) Sets the run status of the transition.voidSets the first value.voidSets the second value.voidstop()Stops the transition.protected static voidUpdates transitions.
- 
Constructor Details- 
RMTransitionCreates a new transition.
- 
RMTransitionCreates a new transition.
 
- 
- 
Method Details- 
getTargetReturns the target.
- 
getKeyReturns the key.
- 
getValue1Returns the first value.
- 
setValue1Sets the first value.
- 
getValue2Returns the second value.
- 
setValue2Sets the second value.
- 
getDurationpublic int getDuration()Returns the duration of the transition in milliseconds.
- 
setDurationpublic void setDuration(int aValue) Sets the duration of the transition in milliseconds.
- 
getDelaypublic int getDelay()Returns the delay of the transition from the time it is told to play to when transition starts.
- 
setDelaypublic void setDelay(int aDelay) Sets the delay of the transition from the time it is told to play to when transition starts.
- 
isAutoReversepublic boolean isAutoReverse()Returns whether the transition does an auto-reverse.
- 
setAutoReversepublic void setAutoReverse(boolean doAutoReverse) Sets whether the transition does an auto-reverse.
- 
getCycleCountpublic int getCycleCount()Returns the number of cycles in animation.
- 
setCycleCountpublic void setCycleCount(int aCount) Sets the number of cycles in animation.
- 
getInterpolatorReturns the interpolator.
- 
setInterpolatorSets the interpolator.
- 
getDelayedDurationpublic int getDelayedDuration()Returns the duration plus delay.
- 
getTotalDurationpublic int getTotalDuration()Returns the total duration of the animation (delayed duration times cycle count).
- 
isRunningpublic boolean isRunning()Returns whether transition is running.
- 
isPausedpublic boolean isPaused()Returns whether transition is paused.
- 
getRunStatusReturns the run status of the transition.
- 
setRunStatusSets the run status of the transition.
- 
getProgresspublic int getProgress()Returns the progress this transition has made since it was started, in milliseconds.
- 
setProgressprotected void setProgress(int aProgress) Sets the progress this transition has made since it was started, in milliseconds.
- 
getProgressRatiopublic double getProgressRatio()Returns the progress ratio for current progress.
- 
getProgressRatioprotected double getProgressRatio(int aProgress) Returns the progress ratio for a progress.
- 
playpublic void play()Tells the transition to start playing.
- 
playFromStartpublic void playFromStart()Tells the transition to start playing from the beginning.
- 
playFrompublic void playFrom(int aTime) Tells the transition to start playing at given time of transition duration (in milliseconds).
- 
pausepublic void pause()Pauses the animation.
- 
stoppublic void stop()Stops the transition.
- 
isTransitioningReturns whether transition is running for given target and key.
- 
getTransitionReturns the transition for given target and key.
- 
updateTransitionsprotected static void updateTransitions()Updates transitions.
- 
compareToStandard compare implementation.- Specified by:
- compareToin interface- Comparable<RMTransition>
 
- 
getInterpolationReturns an invocation by blending this invocation with given invocation using the given fraction of this invocation.
 
-