public class RMTransition extends java.lang.Object implements java.lang.Comparable<RMTransition>
Modifier and Type | Class and Description |
---|---|
static class |
RMTransition.Rotate
A transition for rotation.
|
static class |
RMTransition.RunStatus |
static class |
RMTransition.Translate
A transition for XY.
|
Constructor and Description |
---|
RMTransition(java.lang.Object aTarget,
java.lang.String aKey,
java.lang.Object aValue,
int aDuration,
boolean isRelative)
Creates a new transition.
|
RMTransition(RMKeyValue aKeyVal1,
RMKeyValue aKeyVal2)
Creates a new transition.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RMTransition aTrans)
Standard compare implementation.
|
int |
getCycleCount()
Returns the number of cycles in animation.
|
int |
getDelay()
Returns the delay of the transition from the time it is told to play to when transition starts.
|
int |
getDelayedDuration()
Returns the duration plus delay.
|
int |
getDuration()
Returns the duration of the transition in milliseconds.
|
RMInterpolator |
getInterpolator()
Returns the interpolator.
|
java.lang.String |
getKey()
Returns the key.
|
int |
getProgress()
Returns the progress this transition has made since it was started, in milliseconds.
|
double |
getProgressRatio()
Returns the progress ratio for current progress.
|
RMTransition.RunStatus |
getRunStatus()
Returns the run status of the transition.
|
java.lang.Object |
getTarget()
Returns the target.
|
int |
getTotalDuration()
Returns the total duration of the animation (delayed duration times cycle count).
|
static RMTransition |
getTransition(java.lang.Object aTarget,
java.lang.String aKey)
Returns the transition for given target and key.
|
java.lang.Object |
getValue1()
Returns the first value.
|
java.lang.Object |
getValue2()
Returns the second value.
|
boolean |
isAutoReverse()
Returns whether the transition does an auto-reverse.
|
boolean |
isPaused()
Returns whether transition is paused.
|
boolean |
isRunning()
Returns whether transition is running.
|
static boolean |
isTransitioning(java.lang.Object aTarget,
java.lang.String aKey)
Returns whether transition is running for given target and key.
|
void |
pause()
Pauses the animation.
|
void |
play()
Tells the transition to start playing.
|
void |
playFrom(int aTime)
Tells the transition to start playing at given time of transition duration (in milliseconds).
|
void |
playFromStart()
Tells the transition to start playing from the beginning.
|
void |
setAutoReverse(boolean doAutoReverse)
Sets whether the transition does an auto-reverse.
|
void |
setCycleCount(int aCount)
Sets the number of cycles in animation.
|
void |
setDelay(int aDelay)
Sets the delay of the transition from the time it is told to play to when transition starts.
|
void |
setDuration(int aValue)
Sets the duration of the transition in milliseconds.
|
void |
setInterpolator(RMInterpolator anInterpolator)
Sets the interpolator.
|
void |
setRunStatus(RMTransition.RunStatus aStatus)
Sets the run status of the transition.
|
void |
setValue1(java.lang.Object aValue)
Sets the first value.
|
void |
setValue2(java.lang.Object aValue)
Sets the second value.
|
void |
stop()
Stops the transition.
|
public RMTransition(java.lang.Object aTarget, java.lang.String aKey, java.lang.Object aValue, int aDuration, boolean isRelative)
public RMTransition(RMKeyValue aKeyVal1, RMKeyValue aKeyVal2)
public java.lang.Object getTarget()
public java.lang.String getKey()
public java.lang.Object getValue1()
public void setValue1(java.lang.Object aValue)
public java.lang.Object getValue2()
public void setValue2(java.lang.Object aValue)
public int getDuration()
public void setDuration(int aValue)
public int getDelay()
public void setDelay(int aDelay)
public boolean isAutoReverse()
public void setAutoReverse(boolean doAutoReverse)
public int getCycleCount()
public void setCycleCount(int aCount)
public RMInterpolator getInterpolator()
public void setInterpolator(RMInterpolator anInterpolator)
public int getDelayedDuration()
public int getTotalDuration()
public boolean isRunning()
public boolean isPaused()
public RMTransition.RunStatus getRunStatus()
public void setRunStatus(RMTransition.RunStatus aStatus)
public int getProgress()
public double getProgressRatio()
public void play()
public void playFromStart()
public void playFrom(int aTime)
public void pause()
public void stop()
public static boolean isTransitioning(java.lang.Object aTarget, java.lang.String aKey)
public static RMTransition getTransition(java.lang.Object aTarget, java.lang.String aKey)
public int compareTo(RMTransition aTrans)
compareTo
in interface java.lang.Comparable<RMTransition>