Package org.opensourcephysics.controls
Interface Calculation
- All Known Implementing Classes:
AbstractCalculation
public interface Calculation
Calculation performs a calculation in response to a control's action.
- Version:
- 1.0
- Author:
- Joshua Gould, Wolfgang Christian
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Does the calculation.void
Resets the simulation to a known initial state.void
setControl
(Control control) Sets object that controls this calculation.
-
Method Details
-
setControl
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
void calculate()Does the calculation. -
resetCalculation
void resetCalculation()Resets the simulation to a known initial state.
-