|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.ejs.control.GroupControl org.opensourcephysics.ejs.control.EjsControl org.opensourcephysics.ejs.control.ParsedEjsControl org.opensourcephysics.ejs.control.EjsControlFrame
public class EjsControlFrame
EjsControlFrame defines an Easy Java Simulations control that is guaranteed to have a parent frame.
Field Summary | |
---|---|
protected OSPApplication |
app
|
protected javax.swing.JMenuItem |
clearItem
|
protected javax.swing.JMenuItem[] |
languageItems
|
protected javax.swing.JMenu |
languageMenu
|
protected javax.swing.JFrame |
messageFrame
|
protected Tool |
reply
|
protected javax.swing.JMenuItem |
snapshotItem
|
protected java.beans.PropertyChangeSupport |
support
|
protected javax.swing.JMenuItem |
translateItem
|
protected javax.swing.JMenuItem |
videoItem
|
protected XMLControlElement |
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 |
Fields inherited from interface org.opensourcephysics.controls.Control |
---|
NOT_EDITABLE_BACKGROUND |
Constructor Summary | |
---|---|
EjsControlFrame(java.lang.Object _simulation)
Constructor EjsControlFrame |
|
EjsControlFrame(java.lang.Object _simulation,
java.lang.String param)
Constructor EjsControlFrame |
Method Summary | |
---|---|
void |
addChildFrame(javax.swing.JFrame child)
Adds a child frame that depends on the main frame. |
ControlElement |
addObject(java.lang.Object object,
java.lang.String classname,
java.lang.String propList)
Adds an existing object to this control. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
calculationDone(java.lang.String message)
Stops the animation and prints a message. |
void |
clearChildFrames()
Clears the child frames from the main frame. |
void |
clearData()
Clears data from drawing objects within this frame. |
void |
clearDataAndRepaint()
Clears data from drawing objects within this frame. |
void |
clearDefaultXML()
Clears the current XML default. |
void |
clearMessages()
Remove all text from the message area. |
java.util.Collection<javax.swing.JFrame> |
getChildFrames()
Gets a copy of the ChildFrames collection. |
java.awt.Container |
getContentPane()
Gets the frame's content pane. |
OSPFrame |
getFrame()
Deprecated. |
java.awt.Component |
getGlassPane()
Implementation of RootPaneContainer. |
javax.swing.JLayeredPane |
getLayeredPane()
Implementation of RootPaneContainer. |
OSPFrame |
getMainFrame()
Gets the OSPFrame that contains the control. |
OSPApplication |
getOSPApp()
Gets the OSP Application controlled by this frame. |
javax.swing.JRootPane |
getRootPane()
Gets the frame's root pane. |
java.awt.Container |
getTopLevelAncestor()
Gets the frame that contains the control. |
void |
inspectXML()
|
void |
loadDefaultXML()
Loads the current XML default. |
protected void |
loadDisplayMenu()
Adds a Display menu to the menu bar. |
protected javax.swing.JMenu |
loadToolsMenu()
Adds a Tools menu to the menu bar. |
void |
loadXML()
|
void |
loadXML(java.lang.String fileName)
|
void |
loadXML(java.lang.String[] args)
|
void |
loadXML(XMLControlElement xml,
boolean compatibleModel)
|
void |
parseXMLMenu(java.lang.String xmlMenu)
|
void |
print(java.lang.String s)
Prints a string in the control's message area. |
void |
println()
Prints a blank line in the control's message area. |
void |
println(java.lang.String s)
Prints a string in the control's message area followed by a CR and LF. |
int |
printToGraphics(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Draws the frame into a graphics object suitable for printing. |
protected void |
refreshGUI()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. |
void |
render()
Renders the frame. |
void |
saveXML()
|
void |
setContentPane(java.awt.Container contentPane)
Sets the frame's content pane. |
void |
setGlassPane(java.awt.Component glassPane)
Implementation of RootPaneContainer. |
void |
setLayeredPane(javax.swing.JLayeredPane layeredPane)
Implementation of RootPaneContainer. |
Methods inherited from class org.opensourcephysics.ejs.control.ParsedEjsControl |
---|
getDouble, getInt, getObject, removeParameter, setAdjustableValue, setAdjustableValue, setAdjustableValue, setAdjustableValue, setParameterToFixed |
Methods inherited from class org.opensourcephysics.ejs.control.EjsControl |
---|
clearValues, getPropertyNames, getValue, reset, setLockValues, setValue |
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, initialize, 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 |
Methods inherited from interface org.opensourcephysics.controls.Control |
---|
clearValues, getBoolean, getPropertyNames, getString, setLockValues, setValue, setValue, setValue, setValue |
Field Detail |
---|
protected Tool reply
protected javax.swing.JMenuItem[] languageItems
protected javax.swing.JMenuItem translateItem
protected javax.swing.JMenuItem snapshotItem
protected javax.swing.JMenuItem videoItem
protected javax.swing.JMenuItem clearItem
protected javax.swing.JMenu languageMenu
protected javax.swing.JFrame messageFrame
protected volatile XMLControlElement xmlDefault
protected java.beans.PropertyChangeSupport support
protected OSPApplication app
Constructor Detail |
---|
public EjsControlFrame(java.lang.Object _simulation)
_simulation
- public EjsControlFrame(java.lang.Object _simulation, java.lang.String param)
_simulation
- param
- Method Detail |
---|
public void addChildFrame(javax.swing.JFrame child)
addChildFrame
in interface MainFrame
mainFrame
- JFramepublic void clearChildFrames()
clearChildFrames
in interface MainFrame
public java.util.Collection<javax.swing.JFrame> getChildFrames()
getChildFrames
in interface MainFrame
public OSPFrame getMainFrame()
getMainFrame
in interface MainFrame
public OSPFrame getFrame()
protected javax.swing.JMenu loadToolsMenu()
protected void loadDisplayMenu()
public int printToGraphics(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
g
- pageFormat
- pageIndex
-
java.awt.print.PrinterException
protected void refreshGUI()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the object requesting property change notificationpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener requesting removalpublic void println(java.lang.String s)
println
in interface Control
println
in class EjsControl
s
- public void println()
println
in interface Control
println
in class EjsControl
public void print(java.lang.String s)
print
in interface Control
print
in class EjsControl
s
- public void clearMessages()
clearMessages
in interface Control
clearMessages
in class EjsControl
public void calculationDone(java.lang.String message)
calculationDone
in interface Control
calculationDone
in class EjsControl
message
- Stringpublic void render()
public ControlElement addObject(java.lang.Object object, java.lang.String classname, java.lang.String propList)
addObject
in class EjsControl
object
- Objectclassname
- StringpropList
- String
public void clearData()
public void clearDataAndRepaint()
public java.awt.Container getTopLevelAncestor()
public javax.swing.JRootPane getRootPane()
getRootPane
in interface javax.swing.RootPaneContainer
public java.awt.Container getContentPane()
getContentPane
in interface javax.swing.RootPaneContainer
public void setContentPane(java.awt.Container contentPane)
setContentPane
in interface javax.swing.RootPaneContainer
contentPane
- public javax.swing.JLayeredPane getLayeredPane()
getLayeredPane
in interface javax.swing.RootPaneContainer
RootPaneContainer
public void setLayeredPane(javax.swing.JLayeredPane layeredPane)
setLayeredPane
in interface javax.swing.RootPaneContainer
layeredPane
- RootPaneContainer
public java.awt.Component getGlassPane()
getGlassPane
in interface javax.swing.RootPaneContainer
RootPaneContainer
public void setGlassPane(java.awt.Component glassPane)
setGlassPane
in interface javax.swing.RootPaneContainer
glassPane
- RootPaneContainer
public void parseXMLMenu(java.lang.String xmlMenu)
public void saveXML()
public OSPApplication getOSPApp()
getOSPApp
in interface MainFrame
public void loadDefaultXML()
public void clearDefaultXML()
public void loadXML(java.lang.String fileName)
public void loadXML(XMLControlElement xml, boolean compatibleModel)
public void loadXML()
public void inspectXML()
public void loadXML(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |