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
BranchTreeNode
implements the Swing TreeNode interface to bind dom4j XML Branch nodes (i.e. Document and Element nodes) to a Swing TreeModel.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<javax.swing.tree.TreeNode>
children
Stores 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 protected java.util.List<javax.swing.tree.TreeNode>
createChildList()
Factory method to create List of children TreeNodesprotected javax.swing.tree.TreeNode
createChildTreeNode(Node xmlNode)
Factory method to create child tree nodes for a given XML node typeboolean
getAllowsChildren()
javax.swing.tree.TreeNode
getChildAt(int childIndex)
int
getChildCount()
protected java.util.List<javax.swing.tree.TreeNode>
getChildList()
Uses Lazy Initialization pattern to create a List of childrenint
getIndex(javax.swing.tree.TreeNode node)
protected Branch
getXmlBranch()
java.util.Enumeration<javax.swing.tree.TreeNode>
children()
boolean
isLeaf()
java.lang.String
toString()
-
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent
-
-
-
-
Method Detail
-
children
public java.util.Enumeration<javax.swing.tree.TreeNode> children()
- Specified by:
children
in interfacejavax.swing.tree.TreeNode
- Overrides:
children
in classLeafTreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfacejavax.swing.tree.TreeNode
- Overrides:
getAllowsChildren
in classLeafTreeNode
-
getChildAt
public javax.swing.tree.TreeNode getChildAt(int childIndex)
- Specified by:
getChildAt
in interfacejavax.swing.tree.TreeNode
- Overrides:
getChildAt
in classLeafTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfacejavax.swing.tree.TreeNode
- Overrides:
getChildCount
in classLeafTreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndex
in interfacejavax.swing.tree.TreeNode
- Overrides:
getIndex
in classLeafTreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfacejavax.swing.tree.TreeNode
- Overrides:
isLeaf
in classLeafTreeNode
-
toString
public java.lang.String toString()
- Overrides:
toString
in classLeafTreeNode
-
getChildList
protected java.util.List<javax.swing.tree.TreeNode> getChildList()
Uses Lazy Initialization pattern to create a List of children- Returns:
- DOCUMENT ME!
-
createChildList
protected java.util.List<javax.swing.tree.TreeNode> 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()
-
-