You can create a new Animation by calling one of the animate... methods, AnimationManager.animateValue(double, double, AnimationCurve, double), animateValues(double[], double[], AnimationCurve, double), animatePoint(Point2D, Point2D, AnimationCurve, double), and animateRect(Rectangle2D, Rectangle2D, AnimationCurve, double).
Public Member Functions | |
void | actionPerformed (ActionEvent e) |
Called when an Animation's timer fires. | |
Animation | animatePoint (Point2D initialPoint, Point2D finalPoint, AnimationCurve curve, double duration) |
Returns a new Animation object that will animate a given Point from an initial to a final value over a given duration using a particular animation curve. | |
Animation | animateRect (Rectangle2D initialRect, Rectangle2D finalRect, AnimationCurve curve, double duration) |
Returns a new Animation object that will animate a given Rectangle from an initial to a final value over a given duration using a particular animation curve. | |
Animation | animateValue (double initialValue, double finalValue, AnimationCurve curve, double duration) |
Returns a new Animation object that will animate a given scalar value from an initial to a final value over a given duration using a particular animation curve. | |
Animation | animateValues (double[] initialValues, double[] finalValues, AnimationCurve curve, double duration) |
Returns a new Animation object that will animate each scalar in a given array of scalar values from an initial to a final value over a given duration using a particular animation curve. | |
Static Public Member Functions | |
static AnimationManager | getManager () |
Returns the singleton instance of this manager. | |
Package Functions | |
void | startAnimationTimer (Animation animation) |
Starts the timer associated with this animation, and ensures that the timer will not be garbage collected before the Animation is finished. | |
Private Member Functions | |
AnimationManager () | |
Private constructor. | |
Private Attributes | |
Set< Animation > | animations |
The current set of Animations being managed. | |
Static Private Attributes | |
static AnimationManager | uniqueInstance = null |
The singleton instance of this manager. |
edu.cmu.hcii.calo.view.animation.AnimationManager.AnimationManager | ( | ) | [private] |
Private constructor.
Does nothing special.
static AnimationManager edu.cmu.hcii.calo.view.animation.AnimationManager.getManager | ( | ) | [static] |
Returns the singleton instance of this manager.
void edu.cmu.hcii.calo.view.animation.AnimationManager.actionPerformed | ( | ActionEvent | e | ) |
Called when an Animation's timer fires.
e | the action event |
Animation edu.cmu.hcii.calo.view.animation.AnimationManager.animatePoint | ( | Point2D | initialPoint, | |
Point2D | finalPoint, | |||
AnimationCurve | curve, | |||
double | duration | |||
) |
Returns a new Animation object that will animate a given Point from an initial to a final value over a given duration using a particular animation curve.
Although the AnimationManager will do its best to ensure that the animation takes exactly as long as it's supposed to, the nature of computer timers is such that it may take slightly longer than this to fully complete the animation. The animation will not, however, take less time than the duration indicates it should.
initialPoint | the initial Point | |
finalPoint | the final Point | |
curve | the AnimationCurve to use for this animation | |
duration | the intended duration of the animation. |
Animation edu.cmu.hcii.calo.view.animation.AnimationManager.animateRect | ( | Rectangle2D | initialRect, | |
Rectangle2D | finalRect, | |||
AnimationCurve | curve, | |||
double | duration | |||
) |
Returns a new Animation object that will animate a given Rectangle from an initial to a final value over a given duration using a particular animation curve.
Although the AnimationManager will do its best to ensure that the animation takes exactly as long as it's supposed to, the nature of computer timers is such that it may take slightly longer than this to fully complete the animation. The animation will not, however, take less time than the duration indicates it should.
initialRect | the initial Rectangle | |
finalRect | the final Rectangle | |
curve | the AnimationCurve to use for this animation | |
duration | the intended duration of the animation. |
Animation edu.cmu.hcii.calo.view.animation.AnimationManager.animateValue | ( | double | initialValue, | |
double | finalValue, | |||
AnimationCurve | curve, | |||
double | duration | |||
) |
Returns a new Animation object that will animate a given scalar value from an initial to a final value over a given duration using a particular animation curve.
Although the AnimationManager will do its best to ensure that the animation takes exactly as long as it's supposed to, the nature of computer timers is such that it may take slightly longer than this to fully complete the animation. The animation will not, however, take less time than the duration indicates it should.
initialValue | the initial value of the scalar | |
finalValue | the final value of the scalar | |
curve | the AnimationCurve to use for this animation | |
duration | the intended duration of the animation. |
Animation edu.cmu.hcii.calo.view.animation.AnimationManager.animateValues | ( | double[] | initialValues, | |
double[] | finalValues, | |||
AnimationCurve | curve, | |||
double | duration | |||
) |
Returns a new Animation object that will animate each scalar in a given array of scalar values from an initial to a final value over a given duration using a particular animation curve.
Although the AnimationManager will do its best to ensure that the animation takes exactly as long as it's supposed to, the nature of computer timers is such that it may take slightly longer than this to fully complete the animation. The animation will not, however, take less time than the duration indicates it should.
initialValues | the initial array | |
finalValues | the final array | |
curve | the AnimationCurve to use for this animation | |
duration | the intended duration of the animation. |
void edu.cmu.hcii.calo.view.animation.AnimationManager.startAnimationTimer | ( | Animation | animation | ) | [package] |
Starts the timer associated with this animation, and ensures that the timer will not be garbage collected before the Animation is finished.
animation | the Animation to start a timer for |
AnimationManager edu.cmu.hcii.calo.view.animation.AnimationManager.uniqueInstance = null [static, private] |
The singleton instance of this manager.
The current set of Animations being managed.