org.highpoint.titus.apps.osp.canonicalspaceship
Class CanonicalSpaceShipApp

java.lang.Object
  extended byorg.highpoint.titus.apps.osp.canonicalspaceship.CanonicalSpaceShipApp
All Implemented Interfaces:
org.opensourcephysics.controls.Animation, java.util.EventListener, java.awt.event.KeyListener, java.lang.Runnable

public class CanonicalSpaceShipApp
extends java.lang.Object
implements org.opensourcephysics.controls.Animation, java.lang.Runnable, java.awt.event.KeyListener

Author:
Aaron Titus

Constructor Summary
CanonicalSpaceShipApp()
          Constructor
 
Method Summary
 void initializeAnimation()
          Read parameters from the control start the calculation.
 boolean isOffScreen()
          Checks to see if the spaceship is off the screen.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
static void main(java.lang.String[] args)
          Starts the Java application.
 void resetAnimation()
          Set the default parameters in the control.
 void run()
          The run method is invoked by the animation thread.
 void setControl(org.opensourcephysics.controls.Control control)
          Stores a reference to this program's control.
 void setImage(java.lang.String filename)
           
 void startAnimation()
          Read parameters from the control and start the calculation.
 void stepAnimation()
          Stop the animation.
 void stopAnimation()
          Stop the animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CanonicalSpaceShipApp

public CanonicalSpaceShipApp()
Constructor

Method Detail

setControl

public void setControl(org.opensourcephysics.controls.Control control)
Stores a reference to this program's control.

Specified by:
setControl in interface org.opensourcephysics.controls.Animation
Parameters:
control - Control

resetAnimation

public void resetAnimation()
Set the default parameters in the control.

Specified by:
resetAnimation in interface org.opensourcephysics.controls.Animation

initializeAnimation

public void initializeAnimation()
Read parameters from the control start the calculation.

Specified by:
initializeAnimation in interface org.opensourcephysics.controls.Animation

startAnimation

public void startAnimation()
Read parameters from the control and start the calculation.

Specified by:
startAnimation in interface org.opensourcephysics.controls.Animation

stopAnimation

public void stopAnimation()
Stop the animation.

Specified by:
stopAnimation in interface org.opensourcephysics.controls.Animation

stepAnimation

public void stepAnimation()
Stop the animation.

Specified by:
stepAnimation in interface org.opensourcephysics.controls.Animation

run

public void run()
The run method is invoked by the animation thread. DO NOT access this method.

Specified by:
run in interface java.lang.Runnable

isOffScreen

public boolean isOffScreen()
Checks to see if the spaceship is off the screen.


keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

setImage

public void setImage(java.lang.String filename)

main

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

Parameters:
args - command line parameters