Package org.dom4j.swing
Class BranchTreeNode
- java.lang.Object
-
- org.dom4j.swing.LeafTreeNode
-
- org.dom4j.swing.BranchTreeNode
-
- All Implemented Interfaces:
javax.swing.tree.TreeNode
public class BranchTreeNode extends LeafTreeNode
BranchTreeNodeimplements the Swing TreeNode interface to bind dom4j XML Branch nodes (i.e. Document and Element nodes) to a Swing TreeModel.- Version:
- $Revision: 1.10 $
- Author:
- James Strachan , Jakob Jenkov
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListchildrenStores the child tree nodes-
Fields inherited from class org.dom4j.swing.LeafTreeNode
EMPTY_ENUMERATION, xmlNode
-
-
Constructor Summary
Constructors Constructor Description BranchTreeNode()BranchTreeNode(javax.swing.tree.TreeNode parent, Branch xmlNode)BranchTreeNode(Branch xmlNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumerationchildren()protected java.util.ListcreateChildList()Factory method to create List of children TreeNodesprotected javax.swing.tree.TreeNodecreateChildTreeNode(Node xmlNode)Factory method to create child tree nodes for a given XML node typebooleangetAllowsChildren()javax.swing.tree.TreeNodegetChildAt(int childIndex)intgetChildCount()protected java.util.ListgetChildList()Uses Lazy Initialization pattern to create a List of childrenintgetIndex(javax.swing.tree.TreeNode node)protected BranchgetXmlBranch()booleanisLeaf()java.lang.StringtoString()-
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent
-
-
-
-
Method Detail
-
children
public java.util.Enumeration children()
- Specified by:
childrenin interfacejavax.swing.tree.TreeNode- Overrides:
childrenin classLeafTreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfacejavax.swing.tree.TreeNode- Overrides:
getAllowsChildrenin classLeafTreeNode
-
getChildAt
public javax.swing.tree.TreeNode getChildAt(int childIndex)
- Specified by:
getChildAtin interfacejavax.swing.tree.TreeNode- Overrides:
getChildAtin classLeafTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfacejavax.swing.tree.TreeNode- Overrides:
getChildCountin classLeafTreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndexin interfacejavax.swing.tree.TreeNode- Overrides:
getIndexin classLeafTreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfacejavax.swing.tree.TreeNode- Overrides:
isLeafin classLeafTreeNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classLeafTreeNode
-
getChildList
protected java.util.List getChildList()
Uses Lazy Initialization pattern to create a List of children- Returns:
- DOCUMENT ME!
-
createChildList
protected java.util.List createChildList()
Factory method to create List of children TreeNodes- Returns:
- DOCUMENT ME!
-
createChildTreeNode
protected javax.swing.tree.TreeNode createChildTreeNode(Node xmlNode)
Factory method to create child tree nodes for a given XML node type- Parameters:
xmlNode- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getXmlBranch
protected Branch getXmlBranch()
-
-