org.opensourcephysics.sip.ch09
Class HuygensApp

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

public class HuygensApp
extends AbstractSimulation
implements InteractiveMouseHandler

HuygensApp adds the field from one or more planar point sources.


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
HuygensApp()
          Constructs the HuygensApp
 
Method Summary
 void createSource()
          Creates a point source and adds it to the frame.
protected  void doStep()
          Does an animation step
 void handleMouseAction(InteractivePanel panel, java.awt.event.MouseEvent evt)
          Handles mouse actions by dragging the current interactive object and reinitializing the phasors.
 void initialize()
          Initializes the animation
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets the animation
 
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

HuygensApp

public HuygensApp()
Constructs the HuygensApp

Method Detail

initialize

public void initialize()
Initializes the animation

Overrides:
initialize in class AbstractSimulation

reset

public void reset()
Resets the animation

Overrides:
reset in class AbstractSimulation

createSource

public void createSource()
Creates a point source and adds it to the frame.


handleMouseAction

public void handleMouseAction(InteractivePanel panel,
                              java.awt.event.MouseEvent evt)
Handles mouse actions by dragging the current interactive object and reinitializing the phasors.

Specified by:
handleMouseAction in interface InteractiveMouseHandler
Parameters:
panel -
evt -

doStep

protected void doStep()
Does an animation step

Specified by:
doStep in class AbstractAnimation

main

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

Parameters:
args - command line parameters