IntegerControl instead with DynamicControl.DISPLAY_TYPE.DISPLAY_DEFAULT
This class has been deprecated. Use IntegerControl instead
This class encapsulates the functionality of DynamicControl classes of type ControlType.INT in a simple API
IntegerControlSender and other IntegerControl objects is that IntegerControlSender does not have a handler, however, you can still retrieve the current value using the IntegerControl.getValue()
IntegerControl objects with the same name and ControlScope will respond to a message send.
IntegerControlSender and IntegerTextControl display the value of the control in the HappyBrackets IDE as a written number.
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.
IntegerControlSender is identical to the IntegerTextControl except that IntegerControlSender does not have a IntegerControl.valueChanged(int)) handler
IntegerControl for general information about IntegerControl classes and how to set the value within your codepublic class IntegerControlSender extends IntegerTextControl
| Constructor and Description |
|---|
IntegerControlSender(java.lang.Object parent_sketch,
java.lang.String name,
int initial_value)
Deprecated.
use
IntegerControl instead |
| Modifier and Type | Method and Description |
|---|---|
IntegerControlSender |
setControlScope(ControlScope new_scope)
Deprecated.
Changed the scope that the control has.
|
void |
valueChanged(int control_val)
Deprecated.
When the control receives the value, it will be passed through to the IntegerControl.valueChanged(int) listener that is implemented when the class is created. |
setDisplayTypegetValue, setDisplayRange, setValue, setValueaddControlListener, addControlScopeListener, addControlTarget, addControlTarget, clearControlTargets, getDynamicControl, getSendingDevice, removeControlListener, removeControlScopeChangedListener, removeControlTarget, removeControlTarget, removeListeners, setControlTarget, setControlTargetpublic IntegerControlSender(java.lang.Object parent_sketch,
java.lang.String name,
int initial_value)
IntegerControl insteadparent_sketch - The parent object for controlname - The name to Displayinitial_value - Initial value of the objectpublic void valueChanged(int control_val)
IntegerControlIntegerControl.valueChanged(int) listener that is implemented when the class is created.
IntegerControl control1 = new IntegerControl(this, "Read", 0);
IntegerControl control2 = new IntegerControl(this, "Read", 0) {
@Override
public void valueChanged(int control_val) {
System.out.println("Read " + control_val);
}
};
control1.setValue(2); // this will also set the value of control2
IntegerControl.valueChanged(int) function to be called with the new value, causing Read 2 to be printed to standard outputvalueChanged in class IntegerControlcontrol_val - the value receivedpublic IntegerControlSender setControlScope(ControlScope new_scope)
setControlScope in class IntegerTextControlnew_scope - The new Control Scope