com.miginfocom.ashape.animation
Class OverrideAnimator

java.lang.Object
  extended by com.miginfocom.ashape.animation.Animator
      extended by com.miginfocom.ashape.animation.OverrideAnimator
All Implemented Interfaces:
java.io.Serializable

public class OverrideAnimator
extends Animator

An Animator that uses a TimeLine to map frames to time. Uses the Interactors override functionality to set the new objects.

See Also:
Serialized Form

Field Summary
static int CMD_BACKWARD
          A command to play backwards.
static int CMD_FORWARD
          A command to play forward.
static int CMD_STOP
          A command to stop play.
 
Constructor Summary
OverrideAnimator(Animation animation, TimeLine timeLine, PropertyKey property, java.lang.String target)
          Constructor.
OverrideAnimator(Animation animation, TimeLine timeLine, PropertyKey property, java.lang.String target, java.lang.Integer minFps, java.lang.Integer maxFps)
          Constructor.
OverrideAnimator(Animation animation, TimeLine timeLine, java.lang.String property, java.lang.String target)
          Deprecated. Provided for backwards compatibility. Don't use it.
OverrideAnimator(Animation animation, TimeLine timeLine, java.lang.String property, java.lang.String target, java.lang.Integer minFps, java.lang.Integer maxFps)
          Deprecated. Provided for backwards compatibility. Don't use it.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean executeCommand(AnimatorCommand animatorCommand, Interactor interactor)
          Handles a command.
 PropertyKey getProperty()
          Returns the property.
 java.lang.String getTarget()
          Returns the target.
 TimeLine getTimeLine()
          Returns the time line object.
 
Methods inherited from class com.miginfocom.ashape.animation.Animator
getAnimation, getMaxDelay, getMaxFps, getMinDelay, getMinFps
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_FORWARD

public static final int CMD_FORWARD
A command to play forward.

See Also:
Constant Field Values

CMD_BACKWARD

public static final int CMD_BACKWARD
A command to play backwards.

See Also:
Constant Field Values

CMD_STOP

public static final int CMD_STOP
A command to stop play.

See Also:
Constant Field Values
Constructor Detail

OverrideAnimator

public OverrideAnimator(Animation animation,
                        TimeLine timeLine,
                        java.lang.String property,
                        java.lang.String target)
Deprecated. Provided for backwards compatibility. Don't use it.

Constructor.


OverrideAnimator

public OverrideAnimator(Animation animation,
                        TimeLine timeLine,
                        PropertyKey property,
                        java.lang.String target)
Constructor.

Parameters:
animation - The animation that this animator can use
timeLine - The time line to animate the animation over.
property - The property to override with the animation objects. E.g. AShape.A_PAINT
target - The target for the animation objects. E.g. "background", the name of the AShape to animate,

OverrideAnimator

public OverrideAnimator(Animation animation,
                        TimeLine timeLine,
                        java.lang.String property,
                        java.lang.String target,
                        java.lang.Integer minFps,
                        java.lang.Integer maxFps)
Deprecated. Provided for backwards compatibility. Don't use it.

Constructor.


OverrideAnimator

public OverrideAnimator(Animation animation,
                        TimeLine timeLine,
                        PropertyKey property,
                        java.lang.String target,
                        java.lang.Integer minFps,
                        java.lang.Integer maxFps)
Constructor.

Parameters:
animation - The animation that this animator can use
timeLine - The time line to animate the animation over.
property - The property to override with the animation objects. E.g. AShape.A_PAINT
target - The target for the animation objects. E.g. "background", the name of the AShape to animate,
minFps - The minimum number of frames per second that will be painted. null means no min. Note that when the animation is over there will be no more frames no matter what this value is.
maxFps - The maximum number of frames per second that will ever be painted. null means no max.
Method Detail

executeCommand

public boolean executeCommand(AnimatorCommand animatorCommand,
                              Interactor interactor)
Description copied from class: Animator
Handles a command. Up to the subclasses to define vhat can be handled.

Specified by:
executeCommand in class Animator
Parameters:
animatorCommand - The command.
interactor - The interactor to interact with. Must have a registered AbstractInteractionBroker since it's that object that carries out the commands.
Returns:
false if the animator will keep running or are just paused. false mean that it is safe to remove.

getTimeLine

public TimeLine getTimeLine()
Returns the time line object. Never null.

Returns:
The time line object. Never null.

getProperty

public PropertyKey getProperty()
Returns the property. Never null.

Returns:
The property. Never null.

getTarget

public java.lang.String getTarget()
Returns the target. Never null.

Returns:
The target. Never null.

equals

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


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.