Class ParsedEjsControl

All Implemented Interfaces:
Control, SimControl
Direct Known Subclasses:
EjsControlFrame

public class ParsedEjsControl extends EjsControl implements SimControl
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
  • Constructor Details

    • ParsedEjsControl

      public ParsedEjsControl(Object simulation)
      Constructor ParsedEjsControl
      Parameters:
      simulation -
  • Method Details

    • getDouble

      public double getDouble(String var)
      Gets the double keyed to this value. String values are converted to double using a math expression parser.
      Specified by:
      getDouble in interface Control
      Overrides:
      getDouble in class GroupControl
      Parameters:
      var - String
      Returns:
      double
    • getObject

      public Object getObject(String var)
      Gets the object keyed to the variable.
      Specified by:
      getObject in interface Control
      Overrides:
      getObject in class GroupControl
      Parameters:
      var - String
      Returns:
      Object
    • getInt

      public int getInt(String var)
      Gets the integer keyed to this value. String values are converted to int using a math expression parser.
      Specified by:
      getInt in interface Control
      Overrides:
      getInt in class GroupControl
      Parameters:
      var - String
      Returns:
      double
    • removeParameter

      public void removeParameter(String name)
      Description copied from interface: SimControl
      Removes a parameter from this control.
      Specified by:
      removeParameter in interface SimControl
    • setAdjustableValue

      public void setAdjustableValue(String name, boolean val)
      Description copied from interface: SimControl
      Stores a boolean in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
    • setAdjustableValue

      public void setAdjustableValue(String name, double val)
      Description copied from interface: SimControl
      Stores a double in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
    • setAdjustableValue

      public void setAdjustableValue(String name, int val)
      Description copied from interface: SimControl
      Stores an integer in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
    • setAdjustableValue

      public void setAdjustableValue(String name, Object val)
      Description copied from interface: SimControl
      Stores an object in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
    • setParameterToFixed

      public void setParameterToFixed(String name, boolean fixed)
      Description copied from interface: SimControl
      Sets the fixed property of the given parameter. Fixed parameters can only be changed before initialization.
      Specified by:
      setParameterToFixed in interface SimControl