org.opensourcephysics.sip.ch03
Class DrawingApp

java.lang.Object
  extended by org.opensourcephysics.controls.AbstractCalculation
      extended by org.opensourcephysics.sip.ch03.DrawingApp
All Implemented Interfaces:
Calculation

public class DrawingApp
extends AbstractCalculation

DrawingApp demonstrates how to create and use Drawable objects.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractCalculation
control, decimalFormat, mainFrame
 
Constructor Summary
DrawingApp()
          Constructs the DrawingApp and sets the world coordinate scale.
 
Method Summary
 void calculate()
          Creates a rectangle and adds it to the DisplayFrame.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets the program to its initial state.
 
Methods inherited from class org.opensourcephysics.controls.AbstractCalculation
addChildFrame, clearChildFrames, getChildFrames, getLoader, getMainFrame, getOSPApp, resetCalculation, setControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingApp

public DrawingApp()
Constructs the DrawingApp and sets the world coordinate scale.

Method Detail

calculate

public void calculate()
Creates a rectangle and adds it to the DisplayFrame.

Specified by:
calculate in interface Calculation
Specified by:
calculate in class AbstractCalculation

reset

public void reset()
Resets the program to its initial state.

Overrides:
reset in class AbstractCalculation

main

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

Parameters:
args - command line parameters