org.opensourcephysics.ejs.control
Class EjsSimulationControl
java.lang.Object
org.opensourcephysics.ejs.control.GroupControl
org.opensourcephysics.ejs.control.EjsControl
org.opensourcephysics.ejs.control.ParsedEjsControl
org.opensourcephysics.ejs.control.EjsControlFrame
org.opensourcephysics.ejs.control.EjsSimulationControl
- All Implemented Interfaces:
- javax.swing.RootPaneContainer, Control, MainFrame, SimControl
public class EjsSimulationControl
- extends EjsControlFrame
Fields inherited from class org.opensourcephysics.ejs.control.EjsControlFrame |
app, clearItem, languageItems, languageMenu, messageFrame, reply, snapshotItem, support, translateItem, videoItem, xmlDefault |
Fields inherited from class org.opensourcephysics.ejs.control.GroupControl |
DEBUG_ALL, DEBUG_CONTROL, DEBUG_CONTROL_VERBOSE, DEBUG_DRAWING, DEBUG_DRAWING_VERBOSE, DEBUG_ELEMENTS, DEBUG_NONE, DEBUG_SET_AND_GET, DEBUG_SYSTEM, DEBUG_SYSTEM_VERBOSE, replaceOwnerFrame, replaceOwnerName |
Method Summary |
void |
clearDefaultXML()
Clears the current XML default. |
protected void |
customize()
Override this method to customize the EjsSimulationControl. |
void |
initialize()
Does the calculation. |
void |
render()
Renders (draws) the panel immediately. |
void |
resetSimulation()
Resets the model and switches the text on the run button. |
void |
runSimulation()
Runs the Simulation switches the text on the run button |
void |
stepSimulation()
|
Methods inherited from class org.opensourcephysics.ejs.control.EjsControlFrame |
addChildFrame, addObject, addPropertyChangeListener, calculationDone, clearChildFrames, clearData, clearDataAndRepaint, clearMessages, getChildFrames, getContentPane, getFrame, getGlassPane, getLayeredPane, getMainFrame, getOSPApp, getRootPane, getTopLevelAncestor, inspectXML, loadDefaultXML, loadDisplayMenu, loadToolsMenu, loadXML, loadXML, loadXML, loadXML, parseXMLMenu, print, println, println, printToGraphics, refreshGUI, removePropertyChangeListener, saveXML, setContentPane, setGlassPane, setLayeredPane |
Methods inherited from class org.opensourcephysics.ejs.control.GroupControl |
add, add, addListener, addListener, addNamed, addObject, addTarget, appendPrefixPath, clear, clearPrefixPath, clearVariables, destroy, destroy, getBoolean, getComponent, getContainer, getControl, getDebugLevel, getDefaultPrefixList, getElement, getLoader, getOwnerFrame, getReplaceOwnerFrame, getReplaceOwnerName, getSimulation, getString, getTarget, getTopLevelAncestor, getVisual, isVariableRegistered, registerVariable, removeTarget, rename, replaceOwnerFrame, setActive, setDebugLevel, setOwnerFrame, setSimulation, setValue, setValue, setValue, setValue, setValue, update, variableChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
protected Simulation model
drawingPanel
protected DrawingPanel drawingPanel
controlPanel
protected javax.swing.JPanel controlPanel
EjsSimulationControl
public EjsSimulationControl(Simulation model,
DrawingFrame frame,
java.lang.String[] args)
- Constructor EjsSimulationControl
- Parameters:
model
- frame
- args
-
customize
protected void customize()
- Override this method to customize the EjsSimulationControl.
render
public void render()
- Renders (draws) the panel immediately.
Unlike repaint, the render method is draws the panel within the calling method's thread.
This method is called automatically if the frame is animated.
- Overrides:
render
in class EjsControlFrame
clearDefaultXML
public void clearDefaultXML()
- Clears the current XML default.
- Overrides:
clearDefaultXML
in class EjsControlFrame
resetSimulation
public void resetSimulation()
- Resets the model and switches the text on the run button.
stepSimulation
public void stepSimulation()
runSimulation
public void runSimulation()
- Runs the Simulation switches the text on the run button
initialize
public void initialize()
- Does the calculation.
- Overrides:
initialize
in class GroupControl