|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Animation
The common interface for two different types of animations, ThreadedAnimation and TimerAnimation.
Any Animation can be started, stopped, and paused. Its speed can be modified using the
setTimeDilation(double)
method. All animations send change events when they are
stopped or started. Although animations can run on their own, most animations will probably
be associated with Displays; see the Display
for more information on this,
in particular Display.installAnimation(Animation)
.
See the ThreadedAnimation
class and the TimerAnimation
class
for information about writing animations.
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Register a ChangeListener to receive change events from the animation. |
void |
cancel()
Stop the Animation. |
java.lang.String |
getStatusText(boolean running)
Returns text to be displayed in the display's status bar while this animation is installed. |
double |
getTimeDilation()
Gets the factor that is multiplied by all time period specifications. |
boolean |
isPaused()
Tells whether the animation is paused. |
boolean |
isRunning()
Tests whether the Animation is still running. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
De-register a ChangeListener from this animation, if it is currently registered to receive change events. |
void |
setPaused(boolean paused)
Sets whether a running animation is paused or not. |
void |
setTimeDilation(double dilationFactor)
Sets a factor that is multiplied by all time period specifications. |
void |
start()
Start the animation running. |
Method Detail |
---|
void start()
void cancel()
boolean isRunning()
void setPaused(boolean paused)
paused
- whether the running animation should be in the paused state.boolean isPaused()
void setTimeDilation(double dilationFactor)
dilationFactor
- A non-negative number that will be multiplied by all time measurements.double getTimeDilation()
void addChangeListener(javax.swing.event.ChangeListener listener)
listener
- a ChangeListener that is registered to receive change events from this animation.void removeChangeListener(javax.swing.event.ChangeListener listener)
listener
- to be de-registered as a ChangeListener from this animation.java.lang.String getStatusText(boolean running)
running
- Tells whether the animation is running or paused, so text can depend on this value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |