|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.animation.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 for use 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)
Animator
for the given animation and
frame rate.
animation
- the animation to animateframesPerSecond
- the desired frame rate
NullPointerException
- if the animation is null
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(ActionEvent e)
Timer
.
actionPerformed
in interface ActionListener
e
- the action eventpublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |