Package org.dom4j.swing
Class BranchTreeNode
- java.lang.Object
-
- org.dom4j.swing.LeafTreeNode
-
- org.dom4j.swing.BranchTreeNode
-
- All Implemented Interfaces:
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 List<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(TreeNode parent, Branch xmlNode)
BranchTreeNode(Branch xmlNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<TreeNode>
children()
protected List<TreeNode>
createChildList()
Factory method to create List of children TreeNodesprotected TreeNode
createChildTreeNode(Node xmlNode)
Factory method to create child tree nodes for a given XML node typeboolean
getAllowsChildren()
TreeNode
getChildAt(int childIndex)
int
getChildCount()
protected List<TreeNode>
getChildList()
Uses Lazy Initialization pattern to create a List of childrenint
getIndex(TreeNode node)
protected Branch
getXmlBranch()
boolean
isLeaf()
String
toString()
-
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent
-
-
-
-
Method Detail
-
children
public Enumeration<TreeNode> children()
- Specified by:
children
in interfaceTreeNode
- Overrides:
children
in classLeafTreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfaceTreeNode
- Overrides:
getAllowsChildren
in classLeafTreeNode
-
getChildAt
public TreeNode getChildAt(int childIndex)
- Specified by:
getChildAt
in interfaceTreeNode
- Overrides:
getChildAt
in classLeafTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceTreeNode
- Overrides:
getChildCount
in classLeafTreeNode
-
getIndex
public int getIndex(TreeNode node)
- Specified by:
getIndex
in interfaceTreeNode
- Overrides:
getIndex
in classLeafTreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfaceTreeNode
- Overrides:
isLeaf
in classLeafTreeNode
-
toString
public String toString()
- Overrides:
toString
in classLeafTreeNode
-
getChildList
protected List<TreeNode> getChildList()
Uses Lazy Initialization pattern to create a List of children- Returns:
- DOCUMENT ME!
-
createChildList
protected List<TreeNode> createChildList()
Factory method to create List of children TreeNodes- Returns:
- DOCUMENT ME!
-
createChildTreeNode
protected 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()
-
-