|
||||||||||
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(java.awt.event.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. |
java.lang.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
java.lang.NullPointerException
- if the animation is null
java.lang.IllegalArgumentException
- if the frame rate is non-positiveMethod Detail |
---|
public Animation animation()
public int framesPerSecond()
public long elapsedTime()
public void start()
public void stop()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the action eventpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |