org.opensourcephysics.sip.ch17
Class Affine2DApp

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

public class Affine2DApp
extends AbstractCalculation

Affine2DApp demonstrates how to apply an affine transformation to a 2D shape.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractCalculation
control, decimalFormat, mainFrame
 
Constructor Summary
Affine2DApp()
           
 
Method Summary
 void calculate()
          Performs a calculation by reading the transformation matrix and applying it to the shape.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets the calculation by setting the transformation to the identity and creating a default rectangle.
 
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

Affine2DApp

public Affine2DApp()
Method Detail

calculate

public void calculate()
Performs a calculation by reading the transformation matrix and applying it to the shape.

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

reset

public void reset()
Resets the calculation by setting the transformation to the identity and creating a default rectangle.

Overrides:
reset in class AbstractCalculation

main

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

Parameters:
args - command line parameters