PulpCore

pulpcore.animation
Class Tween

java.lang.Object
  extended by pulpcore.animation.Animation
      extended by pulpcore.animation.Tween
All Implemented Interfaces:
Behavior

public class Tween
extends Animation
implements Behavior


Field Summary
 
Fields inherited from class pulpcore.animation.Animation
LOOP_FOREVER
 
Constructor Summary
Tween(int fromValue, int toValue, int duration)
           
Tween(int fromValue, int toValue, int duration, Easing easing)
           
Tween(int fromValue, int toValue, int duration, Easing easing, int startDelay)
           
 
Method Summary
 int getFromValue()
           
 int getToValue()
           
 int getValue()
          Returns this Behavior's current value.
protected  void setValue(int value)
           
protected  void updateState(int animTime)
          Updates the state based on the animation time, typically from 0 to Animation.getDuration().
 
Methods inherited from class pulpcore.animation.Animation
fastForward, getDuration, getEasing, getLoopDelay, getNumLoops, getStartDelay, getTime, getTotalDuration, isFinished, loop, loop, loopForever, loopForever, rewind, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pulpcore.animation.Behavior
fastForward, isFinished, update
 

Constructor Detail

Tween

public Tween(int fromValue,
             int toValue,
             int duration)

Tween

public Tween(int fromValue,
             int toValue,
             int duration,
             Easing easing)

Tween

public Tween(int fromValue,
             int toValue,
             int duration,
             Easing easing,
             int startDelay)
Method Detail

updateState

protected void updateState(int animTime)
Description copied from class: Animation
Updates the state based on the animation time, typically from 0 to Animation.getDuration(). Note that the duration can be zero.

Specified by:
updateState in class Animation
Parameters:
animTime - The animation time, typically from 0 to Animation.getDuration(), although an Easing can cause the value to be outside those bounds.

getFromValue

public final int getFromValue()

getToValue

public final int getToValue()

setValue

protected final void setValue(int value)

getValue

public final int getValue()
Description copied from interface: Behavior
Returns this Behavior's current value. The value will be interpreted differently depending on the Property it's attached to.

Specified by:
getValue in interface Behavior
Returns:
The current value.

PulpCore

Copyright © 2007-2009 Interactive Pulp, LLC.