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 java.util.List<javax.swing.tree.TreeNode> |
children
Stores the child tree nodes
|
EMPTY_ENUMERATION, xmlNode
Constructor and Description |
---|
BranchTreeNode() |
BranchTreeNode(Branch xmlNode) |
BranchTreeNode(javax.swing.tree.TreeNode parent,
Branch xmlNode) |
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration<javax.swing.tree.TreeNode> |
children() |
protected java.util.List<javax.swing.tree.TreeNode> |
createChildList()
Factory method to create List of children TreeNodes
|
protected javax.swing.tree.TreeNode |
createChildTreeNode(Node xmlNode)
Factory method to create child tree nodes for a given XML node type
|
boolean |
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 children
|
int |
getIndex(javax.swing.tree.TreeNode node) |
protected Branch |
getXmlBranch() |
boolean |
isLeaf() |
java.lang.String |
toString() |
getParent, getXmlNode, setParent
protected java.util.List<javax.swing.tree.TreeNode> children
public BranchTreeNode()
public BranchTreeNode(Branch xmlNode)
public BranchTreeNode(javax.swing.tree.TreeNode parent, Branch xmlNode)
public java.util.Enumeration<javax.swing.tree.TreeNode> children()
children
in interface javax.swing.tree.TreeNode
children
in class LeafTreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class LeafTreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class LeafTreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class LeafTreeNode
public int getIndex(javax.swing.tree.TreeNode node)
getIndex
in interface javax.swing.tree.TreeNode
getIndex
in class LeafTreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
isLeaf
in class LeafTreeNode
public java.lang.String toString()
toString
in class LeafTreeNode
protected java.util.List<javax.swing.tree.TreeNode> getChildList()
protected java.util.List<javax.swing.tree.TreeNode> createChildList()
protected javax.swing.tree.TreeNode createChildTreeNode(Node xmlNode)
xmlNode
- DOCUMENT ME!protected Branch getXmlBranch()