org.opensourcephysics.controls
Interface Animation

All Known Subinterfaces:
Simulation
All Known Implementing Classes:
AbstractAnimation, AbstractSimulation

public interface Animation

An animation performs repetitive calculations in a separate thread. Prior to starting the thread, the control should invoke initializeAnimation(). The thread is started when the control invokes startAnimation().


Method Summary
 void initializeAnimation()
          Initializes the animation.
 void resetAnimation()
          Resets the animation to a known initial state.
 void setControl(Control control)
          Sets the object that controls this animation.
 void startAnimation()
          Starts the animation thread.
 void stepAnimation()
          Performs a single animation step.
 void stopAnimation()
          Stops the animation thread.
 

Method Detail

setControl

public void setControl(Control control)
Sets the object that controls this animation.

Parameters:
control -

startAnimation

public void startAnimation()
Starts the animation thread.


stopAnimation

public void stopAnimation()
Stops the animation thread.


initializeAnimation

public void initializeAnimation()
Initializes the animation.


resetAnimation

public void resetAnimation()
Resets the animation to a known initial state.


stepAnimation

public void stepAnimation()
Performs a single animation step.