org.safs.rational
Class JavaMenuTreeNode

java.lang.Object
  extended by org.safs.rational.MenuTreeNode
      extended by org.safs.rational.JavaMenuTreeNode

public class JavaMenuTreeNode
extends MenuTreeNode


Purpose: Handle the status of Java MenuItem

Since:
APR 15, 2008
APR 15, 2008 (LeiWang) Original Release

Field Summary
static java.lang.String PROPERTY_ENABLED
           
static java.lang.String PROPERTY_ICON
           
static java.lang.String PROPERTY_SELECTED
           
 
Fields inherited from class org.safs.rational.MenuTreeNode
childrenCounter, siblingCounter, STATUS_BARBREAK, STATUS_BITMAP, STATUS_BREAK, STATUS_CHECKED, STATUS_DEFAULT, STATUS_DISABLED, STATUS_ENABLED, STATUS_GRAYED, STATUS_HILITED, STATUS_NORMAL, STATUS_SEPARATOR, STATUS_SUBMENU_NUM, STATUS_UNCHECKED, STATUS_UNGRAYED, STATUS_UNHILITEED, userObject
 
Constructor Summary
JavaMenuTreeNode()
           
JavaMenuTreeNode(java.lang.Object userObject)
           
JavaMenuTreeNode(java.lang.Object userObject, int siblingCounter, int childrenCounter)
           
 
Method Summary
protected  boolean containsBitMap()
           
 java.lang.String getNodeLabel()
          
Note: To be overrided by it's subclass
protected  boolean isChecked()
           
protected  boolean isEnabled()
           
protected  boolean isSeparator()
          Note: Only works for swing application for instance.
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.safs.rational.MenuTreeNode
getProperty, getStatusString, getUserObject, matchStatus, setUserObject, subMenuCountOk, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_ENABLED

public static final java.lang.String PROPERTY_ENABLED
See Also:
Constant Field Values

PROPERTY_SELECTED

public static final java.lang.String PROPERTY_SELECTED
See Also:
Constant Field Values

PROPERTY_ICON

public static final java.lang.String PROPERTY_ICON
See Also:
Constant Field Values
Constructor Detail

JavaMenuTreeNode

public JavaMenuTreeNode()

JavaMenuTreeNode

public JavaMenuTreeNode(java.lang.Object userObject)

JavaMenuTreeNode

public JavaMenuTreeNode(java.lang.Object userObject,
                        int siblingCounter,
                        int childrenCounter)
Method Detail

getNodeLabel

public java.lang.String getNodeLabel()
Description copied from class: MenuTreeNode

Note: To be overrided by it's subclass

Overrides:
getNodeLabel in class MenuTreeNode
Returns:
A String which describes this node. For example, the text "File" on the menu.

isEnabled

protected boolean isEnabled()
Specified by:
isEnabled in class MenuTreeNode
Returns:
boolean, Whether the menuItem is enabled

isChecked

protected boolean isChecked()
Specified by:
isChecked in class MenuTreeNode
Returns:
boolean, Whether this menuItem is selected

containsBitMap

protected boolean containsBitMap()
Specified by:
containsBitMap in class MenuTreeNode
Returns:
boolean, Whether this menuItem contains an Icon

isSeparator

protected boolean isSeparator()
Note: Only works for swing application for instance.

Specified by:
isSeparator in class MenuTreeNode
Returns:
boolean, Whether this is a Separator

main

public static void main(java.lang.String[] args)