edu.cmu.sun.animation
Class ScheduledAnimationAction

java.lang.Object
  extended by edu.cmu.sun.animation.ScheduledAnimation
      extended by edu.cmu.sun.animation.ScheduledAnimationAction
All Implemented Interfaces:
java.lang.Comparable<ScheduledAnimation>

public class ScheduledAnimationAction
extends ScheduledAnimation

Allows for a custom animation to be added to an AnimationPlan. This is a ScheduledAnimation which delegates it's animation responsibility to another object.

Author:
Braden Kowitz

Field Summary
(package private)  AnimationAction action
           
 
Fields inherited from class edu.cmu.sun.animation.ScheduledAnimation
duration, startTime, target
 
Constructor Summary
ScheduledAnimationAction(Component3D target, int startTime, int duration, AnimationAction action)
          Create an ScheduledAnimation that will call an AnimationAction when the animation needs to be performed.
 
Method Summary
 void doAnimation()
          Calls the AnimationAction delegate to perform the animation.
 
Methods inherited from class edu.cmu.sun.animation.ScheduledAnimation
compareTo, getEndTime, getStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

AnimationAction action
Constructor Detail

ScheduledAnimationAction

public ScheduledAnimationAction(Component3D target,
                                int startTime,
                                int duration,
                                AnimationAction action)
Create an ScheduledAnimation that will call an AnimationAction when the animation needs to be performed.

Parameters:
target - Component to be animated.
startTime - Start time, in msec for this animation.
duration - The duration, in msec, for this animation.
action - The object to perform the animation on the target.
Method Detail

doAnimation

public void doAnimation()
Calls the AnimationAction delegate to perform the animation.

Specified by:
doAnimation in class ScheduledAnimation