public abstract class DynamicControlParent
extends java.lang.Object
DynamicControlParent facilitates a simplified abstract API to implement the DynamicControl class.
The values can be represented as sliders, text boxes, check boxes, and buttons
IntegerControl,
FloatControl,
TextControl,
BooleanControl,
TriggerControl, or
ClassObjectControl.| Modifier | Constructor and Description |
|---|---|
protected |
DynamicControlParent(DynamicControl dynamicControl)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
DynamicControlParent |
addControlListener(DynamicControl.DynamicControlListener listener)
Register Listener to receive changed values in the control
|
DynamicControlParent |
addControlScopeListener(DynamicControl.ControlScopeChangedListener listener)
Register Listener to receive changed values in the control scope
|
void |
addControlTarget(java.net.InetAddress... deviceAddresses)
Add one or more
InetAddress as a target for DynamicControl messages. |
void |
addControlTarget(java.lang.String... devices)
Add one or more device names or IP address as a target for
DynamicControl messages. |
void |
clearControlTargets()
Erase all target addresses for the
DynamicControl |
DynamicControl |
getDynamicControl()
Provide underlying access to DynamicControl object
|
java.lang.String |
getSendingDevice()
Get the name of the device that sent the message.
|
DynamicControlParent |
removeControlListener(DynamicControl.DynamicControlListener listener)
Deregister listener so it no longer receives messages from this control
|
DynamicControlParent |
removeControlScopeChangedListener(DynamicControl.ControlScopeChangedListener listener)
Deregister listener so it no longer receives messages from this control
|
void |
removeControlTarget(java.net.InetAddress... inetAddresses)
Remove one or more
InetAddress as a target for DynamicControl messages. |
void |
removeControlTarget(java.lang.String... devices)
Remove one or more device name or IP address as a target for
DynamicControl messages. |
void |
removeListeners()
Removes all listeners from this object
|
DynamicControlParent |
setControlScope(ControlScope new_scope)
Changed the
ControlScope the object has has. |
void |
setControlTarget(java.net.InetAddress... deviceAddresses)
Clear existing targets and add one or more
InetAddress as a target for DynamicControl messages. |
void |
setControlTarget(java.lang.String... devices)
Clear existing targets and add one or more device names or IP address as a target for
DynamicControl messages. |
protected DynamicControlParent(DynamicControl dynamicControl)
dynamicControl - our controlpublic void removeListeners()
public DynamicControlParent addControlListener(DynamicControl.DynamicControlListener listener)
listener - Listener to register for eventspublic DynamicControlParent removeControlListener(DynamicControl.DynamicControlListener listener)
listener - The lsitener we are removingpublic java.lang.String getSendingDevice()
public DynamicControlParent addControlScopeListener(DynamicControl.ControlScopeChangedListener listener)
listener - Listener to register for eventspublic DynamicControlParent removeControlScopeChangedListener(DynamicControl.ControlScopeChangedListener listener)
listener - the listenerpublic DynamicControl getDynamicControl()
public void addControlTarget(java.lang.String... devices)
DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectdevices - the device name or IP address to targetpublic void setControlTarget(java.lang.String... devices)
DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectdevices - the device name or IP address to targetpublic void addControlTarget(java.net.InetAddress... deviceAddresses)
InetAddress as a target for DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectdeviceAddresses - the addresses of the targetspublic void setControlTarget(java.net.InetAddress... deviceAddresses)
InetAddress as a target for DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectdeviceAddresses - the addresses of the targetspublic void clearControlTargets()
DynamicControlpublic void removeControlTarget(java.lang.String... devices)
DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectdevices - the device names or IP addresses to remove as targetspublic void removeControlTarget(java.net.InetAddress... inetAddresses)
InetAddress as a target for DynamicControl messages.
The control must have ControlScope.TARGET scope to have any effectinetAddresses - the addresses of the targets to removepublic DynamicControlParent setControlScope(ControlScope new_scope)
ControlScope the object has has. It will update control map so the correct events will be generated based on its scopenew_scope - The new Control Scope