Class ParsedEjsControl
java.lang.Object
org.opensourcephysics.ejs.control.GroupControl
org.opensourcephysics.ejs.control.EjsControl
org.opensourcephysics.ejs.control.ParsedEjsControl
- All Implemented Interfaces:
Control,SimControl
- Direct Known Subclasses:
EjsControlFrame
An Ejs control that behaves like a standard OSP control insofar as it parses mathematical expressions
stored as strings to produce integers and doubles.
- Version:
- 1.0
- Author:
- W. Christian
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the double keyed to this value.intGets the integer keyed to this value.Gets the object keyed to the variable.voidremoveParameter(String name) Removes a parameter from this control.voidsetAdjustableValue(String name, boolean val) Stores a boolean in the control that can be edited after initialization.voidsetAdjustableValue(String name, double val) Stores a double in the control that can be edited after initialization.voidsetAdjustableValue(String name, int val) Stores an integer in the control that can be edited after initialization.voidsetAdjustableValue(String name, Object val) Stores an object in the control that can be edited after initialization.voidsetParameterToFixed(String name, boolean fixed) Sets the fixed property of the given parameter.Methods inherited from class org.opensourcephysics.ejs.control.EjsControl
addObject, calculationDone, clearMessages, clearValues, getPropertyNames, getPropertyNamesRaw, getValue, print, println, println, reset, setLockValues, setValueMethods 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, variableChangedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.controls.Control
calculationDone, clearMessages, clearValues, getBoolean, getPropertyNames, getPropertyNamesRaw, getString, print, println, println, setLockValues, setValue, setValue, setValue, setValue, setValue
-
Constructor Details
-
ParsedEjsControl
Constructor ParsedEjsControl- Parameters:
simulation-
-
-
Method Details
-
getDouble
Gets the double keyed to this value. String values are converted to double using a math expression parser.- Specified by:
getDoublein interfaceControl- Overrides:
getDoublein classGroupControl- Parameters:
var- String- Returns:
- double
-
getObject
Gets the object keyed to the variable.- Specified by:
getObjectin interfaceControl- Overrides:
getObjectin classGroupControl- Parameters:
var- String- Returns:
- Object
-
getInt
Gets the integer keyed to this value. String values are converted to int using a math expression parser.- Specified by:
getIntin interfaceControl- Overrides:
getIntin classGroupControl- Parameters:
var- String- Returns:
- double
-
removeParameter
Description copied from interface:SimControlRemoves a parameter from this control.- Specified by:
removeParameterin interfaceSimControl
-
setAdjustableValue
Description copied from interface:SimControlStores a boolean in the control that can be edited after initialization.- Specified by:
setAdjustableValuein interfaceSimControl
-
setAdjustableValue
Description copied from interface:SimControlStores a double in the control that can be edited after initialization.- Specified by:
setAdjustableValuein interfaceSimControl
-
setAdjustableValue
Description copied from interface:SimControlStores an integer in the control that can be edited after initialization.- Specified by:
setAdjustableValuein interfaceSimControl
-
setAdjustableValue
Description copied from interface:SimControlStores an object in the control that can be edited after initialization.- Specified by:
setAdjustableValuein interfaceSimControl
-
setParameterToFixed
Description copied from interface:SimControlSets the fixed property of the given parameter. Fixed parameters can only be changed before initialization.- Specified by:
setParameterToFixedin interfaceSimControl
-