|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.anim.AnimationCommand
An abstract command that is also an animation object. Descendants of this class can be used as commands and animation objects at the same time.
The specific animation code must be provided by subclasses This means that these methods have to be implemented:
AnimationObject.initAnimation()
AnimationObject.calcNextFrame(int, int)
AnimationObject.disposeAnimation()
Field Summary | |
protected int |
animationLength
|
protected long |
preferredDuration
|
Constructor Summary | |
protected |
AnimationCommand(AnimationListener listener)
Creates a new instance of AnimationCommand that will provide the given AnimationListener. |
Method Summary | |
protected void |
emit(AnimationEvent evt)
Emits the given event to the bound AnimationListener. |
void |
execute()
Executes this AnimationObject by invoking an AnimationPlayer on it. |
int |
getAnimationLength()
AnimationObject implementatation. |
AnimationListener |
getAnimationListener()
Returns the AnimationListener of this AnimationCommand. |
long |
getPreferredDuration()
AnimationObject implementatation. |
void |
setAnimationLength(int animationLength)
Sets the number of animation frames this object will provide. |
void |
setAnimationListener(AnimationListener listener)
Sets the AnimationListener for this AnimationCommand. |
void |
setPreferredDuration(long msec)
Sets the preferred animation length in milliseconds that the display of all provided animation frames should last. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface y.anim.AnimationObject |
calcNextFrame, disposeAnimation, initAnimation |
Methods inherited from interface y.base.Command |
redo, undo |
Field Detail |
protected int animationLength
protected long preferredDuration
Constructor Detail |
protected AnimationCommand(AnimationListener listener)
Method Detail |
protected void emit(AnimationEvent evt)
public void setAnimationListener(AnimationListener listener)
public AnimationListener getAnimationListener()
getAnimationListener
in interface AnimationObject
public void setAnimationLength(int animationLength)
public int getAnimationLength()
getAnimationLength
in interface AnimationObject
public long getPreferredDuration()
getPreferredDuration
in interface AnimationObject
public void setPreferredDuration(long msec)
public void execute()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |