Class EjsControl
java.lang.Object
org.opensourcephysics.ejs.control.GroupControl
org.opensourcephysics.ejs.control.EjsControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
ParsedEjsControl
A blend of GroupControl and org.opensourcephysics.control.Control
-
Field Summary
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
ConstructorsConstructorDescriptionConstructor EjsControlEjsControl
(Object _simulation) The EjsControl constructor.EjsControl
(Object _simulation, String _replaceName, Frame _replaceOwnerFrame) Constructor EjsControl -
Method Summary
Modifier and TypeMethodDescriptionCreates a new ControlElement that wrapps an existing object If the object is not of the right class it will print a warning and ignore the object provided.void
calculationDone
(String message) Notifies the control when a calculation has completed.void
Clears all text from the control's message area.void
Clears all text from the control's data input area.Reads the current property names.Gets the names of all properties stored in this control.Returns the group value of a variable.void
Prints a string in the control's message area.void
println()
Prints a blank line in the control's message area.void
Prints a string in the control's message area followed by a CR and LF.void
reset()
Reset all elementsvoid
setLockValues
(boolean lock) Locks the control's interface.void
Sets the group value for a variable.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, getDouble, getElement, getInt, getLoader, getObject, 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
-
Constructor Details
-
EjsControl
The EjsControl constructor.- Parameters:
_simulation
-
-
EjsControl
Constructor EjsControl- Parameters:
_simulation
-_replaceName
-_replaceOwnerFrame
-
-
EjsControl
public EjsControl()Constructor EjsControl
-
-
Method Details
-
addObject
Description copied from class:GroupControl
Creates a new ControlElement that wrapps an existing object If the object is not of the right class it will print a warning and ignore the object provided.- Overrides:
addObject
in classGroupControl
-
reset
public void reset()Description copied from class:GroupControl
Reset all elements- Overrides:
reset
in classGroupControl
-
setLockValues
public void setLockValues(boolean lock) Locks the control's interface. Values sent to the control will not update the display until the control is unlocked.- Specified by:
setLockValues
in interfaceControl
- Parameters:
lock
- boolean
-
getPropertyNames
Reads the current property names.- Specified by:
getPropertyNames
in interfaceControl
- Returns:
- the property names
-
getPropertyNamesRaw
Description copied from interface:Control
Gets the names of all properties stored in this control.- Specified by:
getPropertyNamesRaw
in interfaceControl
- Returns:
- the actual property list
-
clearValues
public void clearValues()Description copied from interface:Control
Clears all text from the control's data input area.- Specified by:
clearValues
in interfaceControl
-
clearMessages
public void clearMessages()Description copied from interface:Control
Clears all text from the control's message area.- Specified by:
clearMessages
in interfaceControl
-
println
Description copied from interface:Control
Prints a string in the control's message area followed by a CR and LF. GUI controls will usually display messages in a non-editable text area. -
println
public void println()Description copied from interface:Control
Prints a blank line in the control's message area. GUI controls will usually display messages in a non-editable text area. -
print
Description copied from interface:Control
Prints a string in the control's message area. GUI controls will usually display messages in a non-editable text area. -
calculationDone
Description copied from interface:Control
Notifies the control when a calculation has completed. Some controls, such as the animation control, change their appearance during a calculation. A completed calculation, such as when a predetermined tolerance is reached, can call this method. The message will be displayed in the control's message area.- Specified by:
calculationDone
in interfaceControl
-
setValue
Description copied from class:GroupControl
Sets the group value for a variable. This includes the value in all the elements of this group that are registered to this variable name.- Overrides:
setValue
in classGroupControl
-
getValue
Description copied from class:GroupControl
Returns the group value of a variable.- Overrides:
getValue
in classGroupControl
- Returns:
- the
Value
object of the variable. If the variable has never been set, it returns null.
-