com.miginfocom.ashape.interaction
Class AnimatorCommand

java.lang.Object
  extended by com.miginfocom.util.command.AbstractCommand
      extended by com.miginfocom.ashape.interaction.AnimatorCommand
All Implemented Interfaces:
Command, CommandSet, java.io.Serializable

public class AnimatorCommand
extends AbstractCommand
implements CommandSet

A command type that AShapeAnimatorBroker can handle and send to the correct Animator.

See Also:
Serialized Form

Constructor Summary
AnimatorCommand(Animator animator, int animatorCommand)
          Constructor.
AnimatorCommand(java.lang.Object id, Animator animator, int animatorCommand)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares id.
 java.lang.Object execute()
          Executes something.
 Animator getAnimator()
          Return the animator sent into the constructor.
 int getAnimatorCommand()
          Return the animation command sent into the constructor.
 Command[] getCommands()
          Overridden to return this as the only command.
 java.lang.String toString()
           
 
Methods inherited from class com.miginfocom.util.command.AbstractCommand
createUniqeID, getID, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnimatorCommand

public AnimatorCommand(Animator animator,
                       int animatorCommand)
Constructor.

Parameters:
animator - The animator to control with this command.
animatorCommand - The command to send to the animator. E.g. OverrideAnimator.CMD_FORWARD.

AnimatorCommand

public AnimatorCommand(java.lang.Object id,
                       Animator animator,
                       int animatorCommand)
Constructor.

Parameters:
id - The id associated with this command.
animator - The animator to control with this command.
animatorCommand - The command to send to the animator. E.g. OverrideAnimator.CMD_FORWARD.
Method Detail

getAnimatorCommand

public int getAnimatorCommand()
Return the animation command sent into the constructor.

Returns:
The animation command sent into the constructor. E.g. OverrideAnimator.CMD_FORWARD.

getAnimator

public Animator getAnimator()
Return the animator sent into the constructor.

Returns:
The animator sent into the constructor.

getCommands

public Command[] getCommands()
Overridden to return this as the only command.

Specified by:
getCommands in interface CommandSet
Returns:
this in an array.

execute

public java.lang.Object execute()
Description copied from interface: Command
Executes something.

Specified by:
execute in interface Command
Returns:
An object of null.

equals

public boolean equals(java.lang.Object o)
Description copied from class: AbstractCommand
Compares id.

Overrides:
equals in class AbstractCommand

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.