Class HiddenControl

java.lang.Object
org.opensourcephysics.controls.HiddenControl
All Implemented Interfaces:
Control

public class HiddenControl extends Object implements Control
A Control without a graphical user interface.
Version:
1.0
Author:
Joshua Gould
  • Constructor Details

    • HiddenControl

      public HiddenControl()
  • Method Details

    • 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 interface Control
      Parameters:
      lock - boolean
    • setValue

      public void setValue(String par, Object val)
      Adds an initial value of a parameter to the input display. Input parameters should be read when the calculation is performed.
      Specified by:
      setValue in interface Control
      Parameters:
      par - the parameter name
      val - the initial parameter value
      Since:
    • setValue

      public void setValue(String par, boolean val)
      Add an initial boolean value of a parameter to the input display. Input parameters should be read when the calculation is performed.
      Specified by:
      setValue in interface Control
      Parameters:
      par - the parameter name
      val - the initial parameter value
      Since:
    • setValue

      public void setValue(String par, double val)
      Add an initial value of a parameter to the input display. Input parameters should be read when the calculation is performed.
      Specified by:
      setValue in interface Control
      Parameters:
      par - the parameter name
      val - the initial parameter value
      Since:
    • setValue

      public void setValue(String par, int val)
      Add an initial value of a parameter to the input display. Input parameters should be read when the calculation is performed.
      Specified by:
      setValue in interface Control
      Parameters:
      par - the parameter name
      val - the initial parameter value
      Since:
    • scriptValue

      public void scriptValue(String par, String val)
    • getPropertyNames

      public Collection<String> getPropertyNames()
      /** Gets the names of all properties stored in this control.
      Specified by:
      getPropertyNames in interface Control
      Returns:
      List
    • getPropertyNamesRaw

      public Collection<String> getPropertyNamesRaw()
      Description copied from interface: Control
      Gets the names of all properties stored in this control.
      Specified by:
      getPropertyNamesRaw in interface Control
      Returns:
      the actual property list
    • getDouble

      public double getDouble(String par)
      Read a parameter value from the input display.
      Specified by:
      getDouble in interface Control
      Parameters:
      par -
      Returns:
      double the value of of the parameter
      Since:
    • getInt

      public int getInt(String par)
      Read a parameter value from the input display.
      Specified by:
      getInt in interface Control
      Parameters:
      par -
      Returns:
      int the value of of the parameter
      Since:
    • getObject

      public Object getObject(String name)
      Gets the object with the specified property name. Throws an UnsupportedOperationException if the named object has not been stored.
      Specified by:
      getObject in interface Control
      Parameters:
      name - the name
      Returns:
      the object
    • getString

      public String getString(String par)
      Reads a parameter value from the input display.
      Specified by:
      getString in interface Control
      Parameters:
      par - the parameter name
      Returns:
      String the value of of the parameter
      Since:
    • getBoolean

      public boolean getBoolean(String par)
      Read a parameter value from the input display.
      Specified by:
      getBoolean in interface Control
      Parameters:
      par - the parameter name
      Returns:
      the value of of the parameter
      Since:
    • println

      public void println(String s)
      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.
      Specified by:
      println in interface Control
    • 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.
      Specified by:
      println in interface Control
    • print

      public void print(String s)
      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.
      Specified by:
      print in interface Control
    • clearMessages

      public void clearMessages()
      Description copied from interface: Control
      Clears all text from the control's message area.
      Specified by:
      clearMessages in interface Control
    • calculationDone

      public void calculationDone(String s)
      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 interface Control
    • clearValues

      public void clearValues()
      Description copied from interface: Control
      Clears all text from the control's data input area.
      Specified by:
      clearValues in interface Control