org.opensourcephysics.sip.ch05
Class PlanetApp

java.lang.Object
  extended by org.opensourcephysics.controls.AbstractAnimation
      extended by org.opensourcephysics.controls.AbstractSimulation
          extended by org.opensourcephysics.sip.ch05.PlanetApp
All Implemented Interfaces:
java.lang.Runnable, Animation, Simulation

public class PlanetApp
extends AbstractSimulation

PlanetApp models an orbiting planet. This program demonstrates: how to use the Simulation control to run and single step a time dependent model.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractSimulation
control, showStepsPerDisplay, stepCounter, stepsPerDisplay
 
Fields inherited from class org.opensourcephysics.controls.AbstractAnimation
animationThread, decimalFormat, delayTime, mainFrame
 
Constructor Summary
PlanetApp()
          Constructs the PlanetApp.
 
Method Summary
 void doStep()
          Steps the time.
 void initialize()
          Initializes the animation using the values in the control.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets animation to a predefined state.
 
Methods inherited from class org.opensourcephysics.controls.AbstractSimulation
enableStepsPerDisplay, getControl, getLoader, getStepCounter, getStepsPerDisplay, initializeAnimation, resetAnimation, run, setControl, setStepsPerDisplay, start, startAnimation, startRunning, startSimulation, stepAnimation, stop, stopAnimation, stopRunning, stopSimulation
 
Methods inherited from class org.opensourcephysics.controls.AbstractAnimation
addChildFrame, clearChildFrames, getChildFrames, getDelayTime, getMainFrame, getOSPApp, isRunning, setDelayTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.controls.Simulation
isRunning
 

Constructor Detail

PlanetApp

public PlanetApp()
Constructs the PlanetApp.

Method Detail

doStep

public void doStep()
Steps the time.

Specified by:
doStep in class AbstractAnimation

initialize

public void initialize()
Initializes the animation using the values in the control.

Overrides:
initialize in class AbstractSimulation

reset

public void reset()
Resets animation to a predefined state.

Overrides:
reset in class AbstractSimulation

main

public static void main(java.lang.String[] args)
Starts the Java application.

Parameters:
args - command line parameters