de.enough.polish.ui.cssanimations
Class IntegerCssAnimation

java.lang.Object
  extended by de.enough.polish.ui.CssAnimation
      extended by de.enough.polish.ui.cssanimations.IntegerCssAnimation

public class IntegerCssAnimation
extends CssAnimation

Animates numerical integer CSS attributes.

Copyright Enough Software 2008

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
protected  int endValue
           
protected  int startValue
           
 
Fields inherited from class de.enough.polish.ui.CssAnimation
ANIMATION_FINISHED, cssAttributeId, delay, duration, fireEvent, function, FUNCTION_EASE, FUNCTION_EASE_IN, FUNCTION_EASE_OUT, FUNCTION_EXPONENTIAL_IN, FUNCTION_EXPONENTIAL_OUT, FUNCTION_LINEAR, repeat, triggerEventId
 
Constructor Summary
IntegerCssAnimation(int cssAttributeId, String triggerEvent, long duration, long delay, int function, int repeat, String fireEvent, Integer startValue, Integer endValue)
           
 
Method Summary
 Object animate(Style style, Object styleValue, long passedTime)
          Animates a UI element
 
Methods inherited from class de.enough.polish.ui.CssAnimation
calculateColorInRange, calculatePointInRange, getDelay, getDuration, getEndValue, getFireEvent, getRepeat, getStartValue, setEndValue, setStartValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startValue

protected final int startValue

endValue

protected final int endValue
Constructor Detail

IntegerCssAnimation

public IntegerCssAnimation(int cssAttributeId,
                           String triggerEvent,
                           long duration,
                           long delay,
                           int function,
                           int repeat,
                           String fireEvent,
                           Integer startValue,
                           Integer endValue)
Parameters:
cssAttributeId -
triggerEvent -
duration -
delay -
function -
repeat -
fireEvent -
startValue - the integer value at the beginning
endValue - the integer value at the end of this animation
Method Detail

animate

public Object animate(Style style,
                      Object styleValue,
                      long passedTime)
Description copied from class: CssAnimation
Animates a UI element

Specified by:
animate in class CssAnimation
Parameters:
style - the style of the element
styleValue - the current value
passedTime - the time passed since the start of this animation in milliseconds
Returns:
the next value, ANIMATION_FINISHED when the animation is finished
See Also:
CssAnimation.ANIMATION_FINISHED