|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.controls.AbstractCalculation
public abstract class AbstractCalculation
AbstractCalculation is a template for simple calculations. Implement the calculate method to create a calculation.
| Field Summary | |
|---|---|
protected Control |
control
|
protected java.text.DecimalFormat |
decimalFormat
|
protected OSPFrame |
mainFrame
|
| Constructor Summary | |
|---|---|
AbstractCalculation()
|
|
| Method Summary | |
|---|---|
void |
addChildFrame(javax.swing.JFrame frame)
Adds a child frame that depends on the main frame. |
abstract void |
calculate()
Does the calculation. |
void |
clearChildFrames()
Clears the child frames from the main frame. |
java.util.Collection<javax.swing.JFrame> |
getChildFrames()
Gets a copy of the ChildFrames collection. |
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load data for this object. |
OSPFrame |
getMainFrame()
Gets the main OSPFrame. |
OSPApplication |
getOSPApp()
Gets the main OSPFrame. |
void |
reset()
Resets the program to its default state. |
void |
resetCalculation()
Resets the calculation to a predefined state. |
void |
setControl(Control control)
Sets object that controls this calculation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OSPFrame mainFrame
protected Control control
protected java.text.DecimalFormat decimalFormat
| Constructor Detail |
|---|
public AbstractCalculation()
| Method Detail |
|---|
public void setControl(Control control)
setControl in interface Calculationcontrol - public OSPFrame getMainFrame()
public void addChildFrame(javax.swing.JFrame frame)
frame - JFramepublic OSPApplication getOSPApp()
public void clearChildFrames()
public java.util.Collection<javax.swing.JFrame> getChildFrames()
public abstract void calculate()
calculate in interface Calculationpublic void resetCalculation()
resetCalculation in interface Calculationpublic void reset()
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||