Package 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().
- Version:
- 1.0
- Author:
- Joshua Gould, Wolfgang Christian
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initializes the animation.void
Resets the animation to a known initial state.void
setControl
(Control control) Sets the object that controls this animation.void
Starts the animation thread.void
Performs a single animation step.void
Stops the animation thread.
-
Method Details
-
setControl
Sets the object that controls this animation.- Parameters:
control
-
-
startAnimation
void startAnimation()Starts the animation thread. -
stopAnimation
void stopAnimation()Stops the animation thread. -
initializeAnimation
void initializeAnimation()Initializes the animation. -
resetAnimation
void resetAnimation()Resets the animation to a known initial state. -
stepAnimation
void stepAnimation()Performs a single animation step.
-