com.alee.utils
Class AnimationUtils

java.lang.Object
  extended by com.alee.utils.AnimationUtils

public final class AnimationUtils
extends java.lang.Object

This class provides a set of utilities to simplify UI animation code.

Author:
Mikle Garin

Constructor Summary
AnimationUtils()
           
 
Method Summary
static float calculateSpeed(float location, float minSpeed, float maxSpeed)
          Returns move animation speed depending on the animated object location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationUtils

public AnimationUtils()
Method Detail

calculateSpeed

public static float calculateSpeed(float location,
                                   float minSpeed,
                                   float maxSpeed)
Returns move animation speed depending on the animated object location. Speed provided by this method will ensure smooth movement animation with spring effect.

Specified location must be a floating point number in the inclusive range [0.0, 1.0]. 0.0 location = object is at the start of its path. 1.0 location = object has reached the end of its path.

Parameters:
location - object location on its path
minSpeed - minimum desired object speed, used when object is close to path start and end
maxSpeed - maximum desired object speed, used when object is in the middle of its path
Returns:
move animation speed