com.buglabs.menu
Interface IMenuNode

All Known Implementing Classes:
AbstractMenuNode

Deprecated. The menu system is not used in BUG 2.0. API present for compatibility.

public interface IMenuNode

The Bug menu is a tree structure. This class represents the model interface for the menu. A menu node can be either a container (non executing) or a leaf (executing).


Method Summary
 void execute()
          Deprecated. If menu node is a leaf, the user has selected this node for execution.
 java.lang.String getBusyName()
          Deprecated.  
 java.util.List getChildren()
          Deprecated.  
 java.util.Comparator getComparator()
          Deprecated.  
 java.lang.String getErrorName()
          Deprecated.  
 IMenuNode getFirstParentOfType(java.lang.String type)
          Deprecated. Iterate through ancestors until one of specified type is found.
 java.lang.String getName()
          Deprecated. Name property used in the UI.
 IMenuNode getNextSibling()
          Deprecated.  
 IMenuNode getParent()
          Deprecated.  
 java.lang.String getPath()
          Deprecated.  
 IMenuNode getPreviousSibling()
          Deprecated.  
 boolean hasChildren()
          Deprecated.  
 boolean isBusy()
          Deprecated. If a node is busy, the menu system will display a spinner in the place of the node.
 boolean isError()
          Deprecated.  
 void setName(java.lang.String name)
          Deprecated. Sets the name property used in the UI.
 IMenuNode setParent(IMenuNode parent)
          Deprecated.  
 boolean sortChildren()
          Deprecated.  
 

Method Detail

getParent

IMenuNode getParent()
Deprecated. 

setParent

IMenuNode setParent(IMenuNode parent)
Deprecated. 

getChildren

java.util.List getChildren()
Deprecated. 
Returns:
All children for this node.

sortChildren

boolean sortChildren()
Deprecated. 
Returns:
true if the children should be sorted, and false if they should not be.

getComparator

java.util.Comparator getComparator()
Deprecated. 
Returns:
The Comparator to sort by if sortChildren() returns true. If null is returned, and sortChildren() returns true, the natural ordering, taken from the compareTo() method, will be used.

hasChildren

boolean hasChildren()
Deprecated. 
Returns:
true if number of children greater than 0.

isBusy

boolean isBusy()
Deprecated. 
If a node is busy, the menu system will display a spinner in the place of the node. The user will be able to go back to other nodes while the node is busy. The correct way to utilize this feature is to set the node to busy, spawn a new Thread to take care of the work, and set the node to not busy after the thread completes. This way, the menu system will not block.

Returns:
true if the node is busy and false if the node is not busy.

getBusyName

java.lang.String getBusyName()
Deprecated. 
Returns:
Alternate text to display when a node is busy. If null, use the node name.

getFirstParentOfType

IMenuNode getFirstParentOfType(java.lang.String type)
Deprecated. 
Iterate through ancestors until one of specified type is found. NULL if none found.

Parameters:
type -
Returns:

execute

void execute()
             throws java.lang.Exception
Deprecated. 
If menu node is a leaf, the user has selected this node for execution. Specific logic should be implemented here.

Parameters:
display -
Throws:
java.lang.Exception

getNextSibling

IMenuNode getNextSibling()
Deprecated. 
Returns:
next IMenuNode in tree that is current (list index + 1) in same level.

getPreviousSibling

IMenuNode getPreviousSibling()
Deprecated. 
Returns:
previous IMenuNode in tree that is current (list index - 1) in same level.

getName

java.lang.String getName()
Deprecated. 
Name property used in the UI.

Returns:

setName

void setName(java.lang.String name)
Deprecated. 
Sets the name property used in the UI. Not unique.

Parameters:
name -

getPath

java.lang.String getPath()
Deprecated. 
Returns:
a '.' separated path for this node.

isError

boolean isError()
Deprecated. 
Returns:
true if this node should currently display an error, false otherwise.

getErrorName

java.lang.String getErrorName()
Deprecated. 
Returns:
The name to display if isError() returns true.