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.
Modifier and Type | Field and Description |
---|---|
protected List |
children
Stores the child tree nodes
|
EMPTY_ENUMERATION, xmlNode
Constructor and Description |
---|
BranchTreeNode() |
BranchTreeNode(Branch xmlNode) |
BranchTreeNode(TreeNode parent,
Branch xmlNode) |
Modifier and Type | Method and Description |
---|---|
Enumeration |
children() |
protected List |
createChildList()
Factory method to create List of children TreeNodes
|
protected TreeNode |
createChildTreeNode(Node xmlNode)
Factory method to create child tree nodes for a given XML node type
|
boolean |
getAllowsChildren() |
TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
protected List |
getChildList()
Uses Lazy Initialization pattern to create a List of children
|
int |
getIndex(TreeNode node) |
protected Branch |
getXmlBranch() |
boolean |
isLeaf() |
String |
toString() |
getParent, getXmlNode, setParent
protected List children
public BranchTreeNode()
public BranchTreeNode(Branch xmlNode)
public Enumeration children()
children
in interface TreeNode
children
in class LeafTreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
getAllowsChildren
in class LeafTreeNode
public TreeNode getChildAt(int childIndex)
getChildAt
in interface TreeNode
getChildAt
in class LeafTreeNode
public int getChildCount()
getChildCount
in interface TreeNode
getChildCount
in class LeafTreeNode
public int getIndex(TreeNode node)
getIndex
in interface TreeNode
getIndex
in class LeafTreeNode
public boolean isLeaf()
isLeaf
in interface TreeNode
isLeaf
in class LeafTreeNode
public String toString()
toString
in class LeafTreeNode
protected List getChildList()
protected List createChildList()
protected TreeNode createChildTreeNode(Node xmlNode)
xmlNode
- DOCUMENT ME!protected Branch getXmlBranch()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.