Package org.dom4j.swing
Class BranchTreeNode
java.lang.Object
org.dom4j.swing.LeafTreeNode
org.dom4j.swing.BranchTreeNode
- All Implemented Interfaces:
TreeNode
BranchTreeNode
implements 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
FieldsFields inherited from class org.dom4j.swing.LeafTreeNode
EMPTY_ENUMERATION, xmlNode
-
Constructor Summary
ConstructorsConstructorDescriptionBranchTreeNode
(TreeNode parent, Branch xmlNode) BranchTreeNode
(Branch xmlNode) -
Method Summary
Modifier and TypeMethodDescriptionchildren()
protected List
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
getChildAt
(int childIndex) int
protected List
Uses Lazy Initialization pattern to create a List of childrenint
protected Branch
boolean
isLeaf()
toString()
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent
-
Field Details
-
children
Stores the child tree nodes
-
-
Constructor Details
-
BranchTreeNode
public BranchTreeNode() -
BranchTreeNode
-
BranchTreeNode
-
-
Method Details
-
children
- Specified by:
children
in interfaceTreeNode
- Overrides:
children
in classLeafTreeNode
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceTreeNode
- Overrides:
getAllowsChildren
in classLeafTreeNode
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeNode
- Overrides:
getChildAt
in classLeafTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceTreeNode
- Overrides:
getChildCount
in classLeafTreeNode
-
getIndex
- Specified by:
getIndex
in interfaceTreeNode
- Overrides:
getIndex
in classLeafTreeNode
-
isLeaf
public boolean isLeaf()- Specified by:
isLeaf
in interfaceTreeNode
- Overrides:
isLeaf
in classLeafTreeNode
-
toString
- Overrides:
toString
in classLeafTreeNode
-
getChildList
Uses Lazy Initialization pattern to create a List of children- Returns:
- DOCUMENT ME!
-
createChildList
Factory method to create List of children TreeNodes- Returns:
- DOCUMENT ME!
-
createChildTreeNode
Factory method to create child tree nodes for a given XML node type- Parameters:
xmlNode
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getXmlBranch
-