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, replaceOwnerNameFields 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.voidcalculationDone(String message) Notifies the control when a calculation has completed.voidClears all text from the control's message area.voidClears 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.voidPrints a string in the control's message area.voidprintln()Prints a blank line in the control's message area.voidPrints a string in the control's message area followed by a CR and LF.voidreset()Reset all elementsvoidsetLockValues(boolean lock) Locks the control's interface.voidSets 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:GroupControlCreates 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:
addObjectin classGroupControl
-
reset
public void reset()Description copied from class:GroupControlReset all elements- Overrides:
resetin 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:
setLockValuesin interfaceControl- Parameters:
lock- boolean
-
getPropertyNames
Reads the current property names.- Specified by:
getPropertyNamesin interfaceControl- Returns:
- the property names
-
getPropertyNamesRaw
Description copied from interface:ControlGets the names of all properties stored in this control.- Specified by:
getPropertyNamesRawin interfaceControl- Returns:
- the actual property list
-
clearValues
public void clearValues()Description copied from interface:ControlClears all text from the control's data input area.- Specified by:
clearValuesin interfaceControl
-
clearMessages
public void clearMessages()Description copied from interface:ControlClears all text from the control's message area.- Specified by:
clearMessagesin interfaceControl
-
println
Description copied from interface:ControlPrints 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:ControlPrints 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:ControlPrints 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:ControlNotifies 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:
calculationDonein interfaceControl
-
setValue
Description copied from class:GroupControlSets 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:
setValuein classGroupControl
-
getValue
Description copied from class:GroupControlReturns the group value of a variable.- Overrides:
getValuein classGroupControl- Returns:
- the
Valueobject of the variable. If the variable has never been set, it returns null.
-