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
BranchTreeNodeimplements 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>childrenStores 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 TreeNodecreateChildTreeNode(Node xmlNode)Factory method to create child tree nodes for a given XML node typebooleangetAllowsChildren()TreeNodegetChildAt(int childIndex)intgetChildCount()protected List<TreeNode>getChildList()Uses Lazy Initialization pattern to create a List of childrenintgetIndex(TreeNode node)protected BranchgetXmlBranch()booleanisLeaf()StringtoString()- 
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent 
 - 
 
 - 
 
- 
- 
Method Detail
- 
children
public Enumeration<TreeNode> children()
- Specified by:
 childrenin interfaceTreeNode- Overrides:
 childrenin classLeafTreeNode
 
- 
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
 getAllowsChildrenin interfaceTreeNode- Overrides:
 getAllowsChildrenin classLeafTreeNode
 
- 
getChildAt
public TreeNode getChildAt(int childIndex)
- Specified by:
 getChildAtin interfaceTreeNode- Overrides:
 getChildAtin classLeafTreeNode
 
- 
getChildCount
public int getChildCount()
- Specified by:
 getChildCountin interfaceTreeNode- Overrides:
 getChildCountin classLeafTreeNode
 
- 
getIndex
public int getIndex(TreeNode node)
- Specified by:
 getIndexin interfaceTreeNode- Overrides:
 getIndexin classLeafTreeNode
 
- 
isLeaf
public boolean isLeaf()
- Specified by:
 isLeafin interfaceTreeNode- Overrides:
 isLeafin classLeafTreeNode
 
- 
toString
public String toString()
- Overrides:
 toStringin 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()
 
 - 
 
 -