com.universaldevices.device.model
Class UDControl

java.lang.Object
  extended by com.universaldevices.device.model.UDControl

public class UDControl
extends java.lang.Object

This class represents the possible operations that can be done to a linked device or any states thereof.

Such as Power, Status, SetPoint.
Each control may have some permissible actions associated with it which is captured in this same class as a Hashtable of UDActions.

Author:
UDArchitect

Field Summary
 java.util.Hashtable<java.lang.String,UDAction> actions
          UDActions associated to this control
 java.lang.String desc
          The description if any
 boolean isGlobal
          Whether or not this is a control which applies to ALL the linked devices
 boolean isGUI
          Whether or not this control should pop up on the GUI.
 boolean isNumeric
          Whether or not the values of this control are numeric
 boolean isReadOnly
          Whether or not this control is read only (such as status)
 java.lang.String label
          The label if any
 java.lang.String max
          The maximum possible value for this control
 java.lang.String min
          The minimum possible value for this control
 java.lang.String name
          The name of this control as used to communicate with ISY
 java.lang.String numericUnit
          The String representation of numeric units
 int widgetType
          The type of widget to be used for presentation purposes Unused
 
Constructor Summary
UDControl()
          Constructor
UDControl(XMLElement c)
          Constructor
 
Method Summary
 void addWidget(java.lang.Object view, com.universaldevices.ui.widgets.UDWidget widget)
          This method is used by UD Administrative Console
 com.universaldevices.ui.widgets.UDWidget getFirstWidget()
          This method is used by UD Administrative Console
 java.util.Iterator<UDAction> getSortedActionsIterator()
           
 com.universaldevices.ui.widgets.UDWidget getWidget(java.lang.Object view)
          This method is used by UD Administrative Console
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

public java.util.Hashtable<java.lang.String,UDAction> actions
UDActions associated to this control


isGlobal

public boolean isGlobal
Whether or not this is a control which applies to ALL the linked devices


isGUI

public boolean isGUI
Whether or not this control should pop up on the GUI. Unused


widgetType

public int widgetType
The type of widget to be used for presentation purposes Unused


min

public java.lang.String min
The minimum possible value for this control


max

public java.lang.String max
The maximum possible value for this control


name

public java.lang.String name
The name of this control as used to communicate with ISY


desc

public java.lang.String desc
The description if any


label

public java.lang.String label
The label if any


isReadOnly

public boolean isReadOnly
Whether or not this control is read only (such as status)


isNumeric

public boolean isNumeric
Whether or not the values of this control are numeric


numericUnit

public java.lang.String numericUnit
The String representation of numeric units

If the values are numeric, the String representation of the numeric unit such as F, C, %, etc.

Constructor Detail

UDControl

public UDControl()
Constructor


UDControl

public UDControl(XMLElement c)
Constructor

The constructor is called internally based on the configuration (XML) retrieved from the device (ISY). This class should not be used independently of the underlying UD Network and Services Layers

Parameters:
c -
Method Detail

getSortedActionsIterator

public java.util.Iterator<UDAction> getSortedActionsIterator()

getWidget

public com.universaldevices.ui.widgets.UDWidget getWidget(java.lang.Object view)
This method is used by UD Administrative Console

It maps a widget (a GUI representation of a control) to the UDControl

Parameters:
view - - the view where this widget is attached to

addWidget

public void addWidget(java.lang.Object view,
                      com.universaldevices.ui.widgets.UDWidget widget)
This method is used by UD Administrative Console

It adds a widget (a GUI representation of a control) to the UDControl

Parameters:
view - - the view where this widget is attached to
widget - - the widget

getFirstWidget

public com.universaldevices.ui.widgets.UDWidget getFirstWidget()
This method is used by UD Administrative Console

It gets the first ever widget (a GUI representation of a control) which was associated to this UDControl