TextControl
instead
This class encapsulates the functionality of DynamicControl
classes of type ControlType.TEXT
in a simple API
ControlScope
will respond to a message send. For example:
For example, consider two TextControls with the same ControlScope
and name
TextControl control1 = new TextControlSender(this, "Read", ""); TextControl control2 = new TextControl(this, "Read", "") { @Override public void valueChanged(String control_val) { System.out.println("Read " + control_val); } }; control1.setValue("This is text");
TextControl
except TextControlSender
does not have the TextControl.valueChanged(String)
handler;
public class TextControlSender extends TextControl
Constructor and Description |
---|
TextControlSender(java.lang.Object parent_sketch,
java.lang.String name,
java.lang.String initial_value)
Deprecated.
use
TextControl instead |
Modifier and Type | Method and Description |
---|---|
TextControlSender |
setControlScope(ControlScope new_scope)
Deprecated.
Changed the scope that the control has.
|
void |
valueChanged(java.lang.String control_val)
Deprecated.
|
getValue, setDisplayType, setValue, setValue
addControlListener, addControlScopeListener, addControlTarget, addControlTarget, clearControlTargets, getDynamicControl, getSendingDevice, removeControlListener, removeControlScopeChangedListener, removeControlTarget, removeControlTarget, removeListeners, setControlTarget, setControlTarget
public TextControlSender(java.lang.Object parent_sketch, java.lang.String name, java.lang.String initial_value)
TextControl
insteadparent_sketch
- The parent object for controlname
- The name to Displayinitial_value
- Initial value of the objectpublic void valueChanged(java.lang.String control_val)
valueChanged
in class TextControl
public TextControlSender setControlScope(ControlScope new_scope)
setControlScope
in class TextControl
new_scope
- The new Control Scope