|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.controls.AbstractAnimation
AbstractAnimation is a template for simple animations. Implement the doStep method to create an animation. This method is called from the run method and when the stepAnimation button is pressed.
Field Summary | |
protected java.lang.Thread |
animationThread
|
protected Control |
control
|
protected java.text.DecimalFormat |
decimalFormat
Field decimalFormat can be used to display time and other numeric values. |
protected int |
delayTime
|
Constructor Summary | |
AbstractAnimation()
|
Method Summary | |
protected abstract void |
doStep()
Does an animation step. |
Control |
getControl()
Gets the Control. |
void |
initializeAnimation()
Initializes the animation by reading parameters from the control. |
boolean |
isRunning()
Determines if the animation is running. |
void |
resetAnimation()
Resets the animation to a predefined state. |
void |
run()
Implementation of Runnable interface. |
void |
setControl(Control control)
Sets the Control for this model and initializes the control's values. |
void |
startAnimation()
Starts the animation. |
void |
stepAnimation()
Steps the animation. |
void |
stopAnimation()
Stops the animation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Control control
protected volatile java.lang.Thread animationThread
protected int delayTime
protected java.text.DecimalFormat decimalFormat
Constructor Detail |
public AbstractAnimation()
Method Detail |
public void setControl(Control control)
setControl
in interface Animation
control
- public Control getControl()
public void initializeAnimation()
initializeAnimation
in interface Animation
protected abstract void doStep()
public void stopAnimation()
stopAnimation
in interface Animation
public final boolean isRunning()
public void stepAnimation()
stepAnimation
in interface Animation
public void startAnimation()
startAnimation
in interface Animation
public void resetAnimation()
resetAnimation
in interface Animation
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |