FloatControl.FloatControl(Object, String, double, double, double, DynamicControl.DISPLAY_TYPE)
This class encapsulates the functionality of DynamicControl
classes of type ControlType.FLOAT
in a simple API
FloatBuddyControl
is a hybrid between the FloatSliderControl
and the FloatTextControl
in that the value can be changed in the HappyBrackets IDE with both text and a slider
FloatBuddyControl(Object, String, double, double, double)
FloatControl
objects
FloatControl
objects with the same name and ControlScope
will respond to a value change.
FloatControl
for general information about FloatControl
classes and how to set the value within your codepublic abstract class FloatBuddyControl extends FloatControl
Constructor and Description |
---|
FloatBuddyControl(java.lang.Object parent_sketch,
java.lang.String name,
double initial_value,
double min_val,
double max_val)
|
Modifier and Type | Method and Description |
---|---|
FloatBuddyControl |
setControlScope(ControlScope new_scope)
Deprecated.
Changed the scope that the control has.
|
FloatBuddyControl |
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 FloatBuddyControl(java.lang.Object parent_sketch, java.lang.String name, double initial_value, double min_val, double max_val)
FloatControl.FloatControl(Object, String, double, double, double, DynamicControl.DISPLAY_TYPE)
with DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY
parent_sketch
- The parent object for controlname
- The name to Displayinitial_value
- Initial value of the objectmin_val
- Minimum value to display on Slidermax_val
- Maximum value to display on Sliderpublic FloatBuddyControl setControlScope(ControlScope new_scope)
setControlScope
in class FloatControl
new_scope
- The new Control Scopepublic FloatBuddyControl setDisplayType(DynamicControl.DISPLAY_TYPE display_type)
setDisplayType
in class FloatControl
display_type
- The new Control Scope