|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.animation.Animator
public final class Animator
Starts and stops an animation and triggers the animation at a given frame rate.
| Constructor Summary | |
|---|---|
Animator(Animation animation,
int framesPerSecond)
Constructs an Animator for the given animation and frame rate. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Implements the ActionListener interface used by the Timer. |
Animation |
animation()
Returns the animator's animation. |
long |
elapsedTime()
Returns the elapsed time since animation start. |
int |
framesPerSecond()
Returns the desired frame rate. |
void |
start()
Starts the animator and in turn the animation. |
void |
stop()
Stops the animator. |
String |
toString()
Returns a string representation for the animator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Animator(Animation animation,
int framesPerSecond)
animation - the animation to animateframesPerSecond - the desired frame rate
NullPointerException - if the animation is null
IllegalArgumentException - if the frame rate is non-positive| Method Detail |
|---|
public Animation animation()
public int framesPerSecond()
public long elapsedTime()
public void start()
public void stop()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - the action eventpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||