Package com.ribsapp.shapes
Class RBDocument.MenuTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
com.ribsapp.shapes.RBDocument.MenuTreeNode
- All Implemented Interfaces:
- Serializable,- Cloneable,- MutableTreeNode,- TreeNode
- Enclosing class:
- RBDocument
This inner class models MenuBars, Menus and MenuItems as TreeNodes.
- See Also:
- 
Field SummaryFields inherited from class javax.swing.tree.DefaultMutableTreeNodeallowsChildren, children, EMPTY_ENUMERATION, parent, userObject
- 
Constructor SummaryConstructorsConstructorDescriptionMenuTreeNode(Object aSource) MenuTreeNode(Object aSource, DefaultMutableTreeNode aParent) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidchildren()booleanbooleanstatic ObjectgetChildAt(int index) intstatic intgetChildCount(Object parent) intgetName()booleanisLeaf()booleanmoveChild(RBDocument.MenuTreeNode aMenuElement, boolean moveEarlier) Rearrange a child menu item in children or grandchildrenvoidremove(RBDocument.MenuTreeNode aMenuElement) remove a child menu elementvoidvoidtoString()Methods inherited from class javax.swing.tree.DefaultMutableTreeNodeadd, breadthFirstEnumeration, clone, depthFirstEnumeration, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
- 
Constructor Details- 
MenuTreeNode
- 
MenuTreeNode
 
- 
- 
Method Details- 
children- Specified by:
- childrenin interface- TreeNode
- Overrides:
- childrenin class- DefaultMutableTreeNode
 
- 
getAllowsChildrenpublic boolean getAllowsChildren()- Specified by:
- getAllowsChildrenin interface- TreeNode
- Overrides:
- getAllowsChildrenin class- DefaultMutableTreeNode
 
- 
getChildAt- Specified by:
- getChildAtin interface- TreeNode
- Overrides:
- getChildAtin class- DefaultMutableTreeNode
 
- 
getChildCountpublic int getChildCount()- Specified by:
- getChildCountin interface- TreeNode
- Overrides:
- getChildCountin class- DefaultMutableTreeNode
 
- 
getIndex- Specified by:
- getIndexin interface- TreeNode
- Overrides:
- getIndexin class- DefaultMutableTreeNode
 
- 
isLeafpublic boolean isLeaf()- Specified by:
- isLeafin interface- TreeNode
- Overrides:
- isLeafin class- DefaultMutableTreeNode
 
- 
toString- Overrides:
- toStringin class- DefaultMutableTreeNode
 
- 
equals
- 
getSource
- 
getName
- 
setName
- 
setText
- 
getChildren
- 
getChild
- 
getChildCount
- 
add
- 
removeremove a child menu element
- 
moveChildRearrange a child menu item in children or grandchildren- Parameters:
- aMenuElement- the item to move
- moveEarlier- true if the new index is lower than the old, false if the new index is higher than the old
- Returns:
- whether the item was found
 
 
-