Class Animation


  extended by Object
      extended by Animation

public class Animation
extends Object

Animation represents timed transition of source() state to target() state. System calls the AnimationCallback to update the script about the progress of animation. Frame rate of animation of controlled by return value of AnimationCallback.

Since:
3.0.0

Constructor Summary
Animation(int source, int target, int duration, int frame, int mode, AnimationCallback callback)
          Creates and starts new animation.
 
Method Summary
 void cancel()
          Stops this animation sequence.
 int duration()
          Returns the duration of animation, in milliseconds.
 int source()
          Returns the source value of transition.
 int started()
          Returns the start time of animation.
 int target()
          Returns the target value of transition.
 
Methods inherited from class Object
toString, equals, hashCode
 
Methods inherited from
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animation

public Animation(int source,
                 int target,
                 int duration,
                 int frame,
                 int mode,
                 AnimationCallback callback)
Creates and starts new animation. Animation will stop the specified duration has passed, or when the callback returns zero or negative frame rate value.

Parameters:
source - Source value of animation
target - Target value of animation
duration - Duration of animation in milliseconds
frame - Desired frame rate in milliseconds
mode - Interpolation, either ANIMATION_LINEAR, ANIMATION_QUAD or ANIMATION_SINE.
callback - Callback to handle the physical transitions
Since:
3.0.0
Method Detail

started

public int started()
Returns the start time of animation.

Since:
3.0.0

duration

public int duration()
Returns the duration of animation, in milliseconds.

Since:
3.0.0

source

public int source()
Returns the source value of transition.

Since:
3.0.0

target

public int target()
Returns the target value of transition.

Since:
3.0.0

cancel

public void cancel()
Stops this animation sequence.

Since:
3.0.0