|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.anim.AnimationPlayer
An animation player that interpretes a given animation object.
The animation player first calls AnimationObject.initAnimation()
. Then
it calls successively AnimationObject.calcNextFrame(int,int)
with
appropriate arguments until the animation has reached its last frame.
Finally AnimationObject.disposeAnimation()
gets called.
It is the responsibility to inform the AnimationListener of a AnimationObject when an animation frame has changed.
Constructor Summary | |
AnimationPlayer()
Creates a new Instance of AnimationPlayer. |
|
AnimationPlayer(double speedFactor)
Creates a new Instance of AnimationPlayer with a given speed factor. |
Method Summary | |
void |
animate(AnimationObject anim)
Processes the given AnimationObject and informs the AnimationListener whenever changes in the animation scene should be displayed. |
void |
decreaseSpeed()
Decreases the speed factor of the animation by 50 percent. |
double |
getSpeed()
Returns the speed factor of the animation player. |
boolean |
getSynchronizedMode()
Whether or not the player is in synchronized mode. |
void |
increaseSpeed()
Increases the speed factor of the animation by 50 percent |
void |
setSpeed(double speedFactor)
Sets the speed factor for the player. |
void |
setSynchronizedMode(boolean sync)
Set or resets synchronized mode of the player. the animation player should be used in synchronized mode whenever the player is run in a separate thread so that synchronization with the AWT thread is necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnimationPlayer()
public AnimationPlayer(double speedFactor)
Method Detail |
public void animate(AnimationObject anim)
public double getSpeed()
public void setSpeed(double speedFactor)
By default the speed factor is 1.0
public void increaseSpeed()
public void decreaseSpeed()
public void setSynchronizedMode(boolean sync)
public boolean getSynchronizedMode()
|
© 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 |