org.opensourcephysics.controls
Class HiddenControl

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

public class HiddenControl
extends java.lang.Object
implements Control

A Control without a graphical user interface.


Constructor Summary
HiddenControl()
           
 
Method Summary
 void calculationDone(java.lang.String s)
          Notifies the control when a calculation has completed.
 void clearMessages()
          Clears all text from the control's message area.
 void clearValues()
          Clears all text from the control's data input area.
 boolean getBoolean(java.lang.String par)
          Read a parameter value from the input display.
 double getDouble(java.lang.String par)
          Read a parameter value from the input display.
 int getInt(java.lang.String par)
          Read a parameter value from the input display.
 java.lang.Object getObject(java.lang.String name)
          Gets the object with the specified property name.
 java.util.Collection getPropertyNames()
          /** Gets the names of all properties stored in this control.
 java.lang.String getString(java.lang.String par)
          Reads a parameter value from the input display.
 void print(java.lang.String s)
          Prints a string in the control's message area.
 void println()
          Prints a blank line in the control's message area.
 void println(java.lang.String s)
          Prints a string in the control's message area followed by a CR and LF.
 void scriptValue(java.lang.String par, java.lang.String val)
           
 void setLockValues(boolean lock)
          Locks the control's interface.
 void setValue(java.lang.String par, boolean val)
          Add an initial boolean value of a parameter to the input display.
 void setValue(java.lang.String par, double val)
          Add an initial value of a parameter to the input display.
 void setValue(java.lang.String par, int val)
          Add an initial value of a parameter to the input display.
 void setValue(java.lang.String par, java.lang.Object val)
          Adds an initial value of a parameter to the input display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiddenControl

public HiddenControl()
Method Detail

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(java.lang.String par,
                     java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String par,
                        java.lang.String val)

getPropertyNames

public java.util.Collection getPropertyNames()
/** Gets the names of all properties stored in this control.

Specified by:
getPropertyNames in interface Control
Returns:
List

getDouble

public double getDouble(java.lang.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(java.lang.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 java.lang.Object getObject(java.lang.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 java.lang.String getString(java.lang.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(java.lang.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(java.lang.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
Parameters:
s -

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(java.lang.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
Parameters:
s -

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(java.lang.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
Parameters:
s -

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