org.opensourcephysics.controls
Interface Calculation

All Known Implementing Classes:
AbstractCalculation

public interface Calculation

Calculation performs a calculation in response to a control's action.


Method Summary
 void calculate()
          Does the calculation.
 void resetCalculation()
          Resets the simulation to a known initial state.
 void setControl(Control control)
          Sets object that controls this calculation.
 

Method Detail

setControl

public void setControl(Control control)
Sets object that controls this calculation. The calculation should use this method to register its parameters with the control. This insures that the control displays the program's parameters when it appears onscreen.

Parameters:
control -

calculate

public void calculate()
Does the calculation.


resetCalculation

public void resetCalculation()
Resets the simulation to a known initial state.