Animation, Simulationpublic abstract class AbstractSimulation extends AbstractAnimation implements Simulation
| Modifier and Type | Field | Description |
|---|---|---|
protected SimControl |
control |
|
protected boolean |
showStepsPerDisplay |
|
protected int |
stepCounter |
|
protected int |
stepsPerDisplay |
animationThread, decimalFormat, delayTime, mainFrame| Constructor | Description |
|---|---|
AbstractSimulation() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
enableStepsPerDisplay(boolean enable) |
Enables the steps per display variable in the control;
|
Control |
getControl() |
Gets this simulation's control.
|
static XML.ObjectLoader |
getLoader() |
Returns an XML.ObjectLoader to save and load data for this object.
|
int |
getStepCounter() |
Gets number of animation steps that have been performed since the last initializeAnimation.
|
int |
getStepsPerDisplay() |
Gets the number of animation steps before animated drawing panels are rendered.
|
void |
initialize() |
Initializes the simulation.
|
void |
initializeAnimation() |
Deprecated.
|
void |
reset() |
Resets the simulation to its default state.
|
void |
resetAnimation() |
Deprecated.
|
void |
run() |
Implementation of Runnable interface.
|
void |
setControl(Control control) |
Sets the Control for this model and initializes the control's values.
|
void |
setStepsPerDisplay(int num) |
Sets the number of animation steps before animated drawing panels are rendered.
|
void |
start() |
Starts the simulation.
|
void |
startAnimation() |
Deprecated.
|
void |
startRunning() |
Performs an action before executing one or more animation steps.
|
void |
startSimulation() |
Starts the simulation thread.
|
void |
stepAnimation() |
Steps the simulation.
|
void |
stop() |
Stops the simulation.
|
void |
stopAnimation() |
Deprecated.
|
void |
stopRunning() |
Performs an action after executing one or more animation steps.
|
void |
stopSimulation() |
Stops the simulation thread.
|
addChildFrame, clearChildFrames, doStep, getChildFrames, getDelayTime, getMainFrame, getOSPApp, isRunning, setDelayTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisRunningprotected SimControl control
protected boolean showStepsPerDisplay
protected int stepsPerDisplay
protected int stepCounter
public void setControl(Control control)
setControl in interface AnimationsetControl in class AbstractAnimationcontrol - public Control getControl()
getControl in class AbstractAnimationpublic void startRunning()
public void stopRunning()
public void startAnimation()
startAnimation in interface AnimationstartAnimation in class AbstractAnimationpublic final void startSimulation()
startSimulation in interface Simulationpublic void start()
public void stopAnimation()
stopAnimation in interface AnimationstopAnimation in class AbstractAnimationpublic final void stopSimulation()
stopSimulation in interface Simulationpublic void stop()
public final void stepAnimation()
stepAnimation in interface AnimationstepAnimation in class AbstractAnimationpublic void initializeAnimation()
initializeAnimation in interface AnimationinitializeAnimation in class AbstractAnimationpublic int getStepCounter()
public void initialize()
public void resetAnimation()
resetAnimation in interface AnimationresetAnimation in class AbstractAnimationpublic void enableStepsPerDisplay(boolean enable)
enable - booleanpublic void setStepsPerDisplay(int num)
num - intpublic int getStepsPerDisplay()
num - intpublic void reset()
public void run()
run in class AbstractAnimationpublic static XML.ObjectLoader getLoader()