com.neuron.app.tonto
Class CCFDevice

java.lang.Object
  extended by com.neuron.app.tonto.CCFNode
      extended by com.neuron.app.tonto.CCFDevice
All Implemented Interfaces:
IListElement, INamed, java.lang.Cloneable

public class CCFDevice
extends CCFNode
implements INamed, IListElement

A container for Panels like the Home Panels, Device Panels and Macro Panels. This allows for the naming of keys, attachment of action lists and panel navigation management.


Field Summary
static int HAS_SEPARATOR
           
static int IS_TEMPLATE
           
static int IS_TIMER_GROUP
           
static int NEEDS_PROGRAMMING
           
static int READ_ONLY
           
 
Fields inherited from class com.neuron.app.tonto.CCFNode
TEXT_CENTER, TEXT_LEFT, TEXT_RIGHT
 
Method Summary
 void addPanel(CCFPanel panel)
          Add a panel to this Device.
 void appendDevice(CCFDevice device)
          Append a device to the end of the device list.
 CCFPanel createPanel(java.lang.String name)
          Create a new panel.
 CCFDevice delete()
          Remove this device from the device list.
 CCFAction[] getActions()
           
 CCFNode getClone()
           
 CCFPanel getFirstPanel()
          Return the first sub-panel.
 boolean getFlag(int flag)
          Return the status of a Device flag.
 CCFHardKey[] getHardKeys()
           
 java.lang.String getName()
          Return the name of this device.
 CCFDevice getNextDevice()
          Return the next device in the list.
 IListElement getNextElement()
           
 CCFPanel getPanelByName(java.lang.String name)
          Return the first panel with the specified name.
 int getRFExtender()
           
 void insertAfter(CCFDevice dev)
           
 void insertBefore(CCFDevice dev)
           
 void setFirstPanel(CCFPanel panel)
          Set the first sub-panel.
 void setFlag(int flag, boolean set)
          Set the status of a Device flag.
 void setKeyActions(CCFHardKey[] keys)
           
 void setName(java.lang.String name)
          Set the name of this device.
 void setNextDevice(CCFDevice device)
          Set the next device in the list.
 void setRFExtender(int rf)
           
 java.lang.String toString()
           
 
Methods inherited from class com.neuron.app.tonto.CCFNode
getHeader, getParent, getParentDevice, getParentPanel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ_ONLY

public static final int READ_ONLY
See Also:
Constant Field Values

IS_TIMER_GROUP

public static final int IS_TIMER_GROUP
See Also:
Constant Field Values

NEEDS_PROGRAMMING

public static final int NEEDS_PROGRAMMING
See Also:
Constant Field Values

HAS_SEPARATOR

public static final int HAS_SEPARATOR
See Also:
Constant Field Values

IS_TEMPLATE

public static final int IS_TEMPLATE
See Also:
Constant Field Values
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class CCFNode

getClone

public CCFNode getClone()

getActions

public CCFAction[] getActions()

getPanelByName

public CCFPanel getPanelByName(java.lang.String name)
Return the first panel with the specified name.

Parameters:
name - name of panel to retrieve

getHardKeys

public CCFHardKey[] getHardKeys()

setKeyActions

public void setKeyActions(CCFHardKey[] keys)

getRFExtender

public int getRFExtender()

setRFExtender

public void setRFExtender(int rf)

getNextElement

public IListElement getNextElement()
Specified by:
getNextElement in interface IListElement

getNextDevice

public CCFDevice getNextDevice()
Return the next device in the list.


setNextDevice

public void setNextDevice(CCFDevice device)
Set the next device in the list. If the next device already exists, the list will become truncated with the new next device.

Parameters:
device - new next device

appendDevice

public void appendDevice(CCFDevice device)
Append a device to the end of the device list.

Parameters:
device - new last device

insertAfter

public void insertAfter(CCFDevice dev)

insertBefore

public void insertBefore(CCFDevice dev)

getFlag

public boolean getFlag(int flag)
Return the status of a Device flag. The valid flags are READ_ONLY, HAS_SEPARATOR, and IS_TEMPLATE.

Parameters:
flag - name of flag to check
Returns:
true if the flag is set, false otherwise

setFlag

public void setFlag(int flag,
                    boolean set)
Set the status of a Device flag.

Parameters:
flag - name of flag to set
set - set on or off
See Also:
getFlag(int)

getName

public java.lang.String getName()
Return the name of this device.

Specified by:
getName in interface INamed

setName

public void setName(java.lang.String name)
Set the name of this device.

Parameters:
name - new device name

getFirstPanel

public CCFPanel getFirstPanel()
Return the first sub-panel.


setFirstPanel

public void setFirstPanel(CCFPanel panel)
Set the first sub-panel.

Parameters:
panel - new first panel

createPanel

public CCFPanel createPanel(java.lang.String name)
Create a new panel. The new panel is not added to the device.


addPanel

public void addPanel(CCFPanel panel)
Add a panel to this Device.


delete

public CCFDevice delete()
Remove this device from the device list.

Returns:
the new root (if any) for this linked list.