com.miginfocom.ashape.animation.animations
Class AtValueAnimation

java.lang.Object
  extended by com.miginfocom.ashape.animation.animations.AbstractAnimation
      extended by com.miginfocom.ashape.animation.animations.AtValueAnimation
All Implemented Interfaces:
Animation, java.io.Serializable

public class AtValueAnimation
extends AbstractAnimation

Animates over a subclass of AtRefRangeNumber.

See Also:
Serialized Form

Constructor Summary
AtValueAnimation(AtRefRangeNumber sNum, AtRefRangeNumber eNum)
          Constructor for no precalculated values.
AtValueAnimation(AtRefRangeNumber sNum, AtRefRangeNumber eNum, int cacheFrameCount)
          Constructor.
 
Method Summary
protected  void assertCompatible(AtRefRangeNumber sNum, AtRefRangeNumber eNum)
          Throws a IllegalArgumentException if the values aren't of same class type
protected  java.lang.Object createObject(float perc)
          Returns a newly created object that complies to the same rules as AbstractAnimation.getObject(float).
 boolean equals(java.lang.Object o)
           
 AtRefRangeNumber getEndValue()
          Returns value 2.
 AtRefRangeNumber getStartValue()
          Returns value 1.
 
Methods inherited from class com.miginfocom.ashape.animation.animations.AbstractAnimation
createCache, createCacheImpl, getFrameCount, getObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtValueAnimation

public AtValueAnimation(AtRefRangeNumber sNum,
                        AtRefRangeNumber eNum)
Constructor for no precalculated values. n1 and n2 needs to be of same type.

Parameters:
sNum - The first value. Not null.
eNum - The second value. Not null.
See Also:
AbstractAnimation

AtValueAnimation

public AtValueAnimation(AtRefRangeNumber sNum,
                        AtRefRangeNumber eNum,
                        int cacheFrameCount)
Constructor. n1 and n2 needs to be of same type.

Parameters:
sNum - The first value. Not null.
eNum - The second value. Not null.
cacheFrameCount - The number of cached values. Use to create a "set" of values so that the AbstractAnimation.getObject(float) won't have to make new once for every call.
See Also:
AbstractAnimation
Method Detail

createObject

protected java.lang.Object createObject(float perc)
Description copied from class: AbstractAnimation
Returns a newly created object that complies to the same rules as AbstractAnimation.getObject(float). For subclasses to implement.

Specified by:
createObject in class AbstractAnimation
Parameters:
perc - 0.0 to 1.0 0.0 is the first Object/frame and 1.0 is the last.
Returns:
A newly created object that complies to the same rules as AbstractAnimation.getObject(float).

assertCompatible

protected void assertCompatible(AtRefRangeNumber sNum,
                                AtRefRangeNumber eNum)
Throws a IllegalArgumentException if the values aren't of same class type

Parameters:
sNum - The start value
eNum - The end value

getStartValue

public AtRefRangeNumber getStartValue()
Returns value 1.

Returns:
The first value.

getEndValue

public AtRefRangeNumber getEndValue()
Returns value 2.

Returns:
The second value.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class AbstractAnimation


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.