FloatControl
This class encapsulates the functionality of DynamicControl
classes of type ControlType.FLOAT
in a simple API
FloatControlSender
and other FloatControl
objects is that @link FloatControlSender} does not have a handler, however, you can still retrieve the current value using the FloatControl.getValue()
FloatControl
objects with the same name and ControlScope
will respond to a message send. For example:
FloatControlSender
and FloatTextControl
display the approximate value of the control in the HappyBrackets IDE.
Within the IDE, the value of the value of the control can be changed by typing a new value in and pressing the ENTER or RETURN key.
FloatControlSender
is identical to the FloatTextControl
except that FloatControlSender
does not have a FloatControl.valueChanged(double)
) handler
FloatControl
for general information about FloatControl
classes and how to set the value within your codepublic abstract class FloatTextControl extends FloatControl
Constructor and Description |
---|
FloatTextControl(java.lang.Object parent_sketch,
java.lang.String name,
double initial_value)
Deprecated.
use
FloatControl |
Modifier and Type | Method and Description |
---|---|
FloatTextControl |
setControlScope(ControlScope new_scope)
Deprecated.
Changed the scope that the control has.
|
FloatTextControl |
setDisplayType(DynamicControl.DISPLAY_TYPE display_type)
Deprecated.
Change how to display object
We must do this in subclass
|
getValue, setDisplayRange, setValue, setValue, valueChanged
addControlListener, addControlScopeListener, addControlTarget, addControlTarget, clearControlTargets, getDynamicControl, getSendingDevice, removeControlListener, removeControlScopeChangedListener, removeControlTarget, removeControlTarget, removeListeners, setControlTarget, setControlTarget
public FloatTextControl(java.lang.Object parent_sketch, java.lang.String name, double initial_value)
FloatControl
parent_sketch
- The parent object for controlname
- The name to Displayinitial_value
- Initial value of the objectpublic FloatTextControl setControlScope(ControlScope new_scope)
setControlScope
in class FloatControl
new_scope
- The new Control Scopepublic FloatTextControl setDisplayType(DynamicControl.DISPLAY_TYPE display_type)
setDisplayType
in class FloatControl
display_type
- The new Control Scope