org.dom4j.swing
Class BranchTreeNode

java.lang.Object
  extended byorg.dom4j.swing.LeafTreeNode
      extended byorg.dom4j.swing.BranchTreeNode
All Implemented Interfaces:
javax.swing.tree.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.

Version:
$Revision: 1.10 $
Author:
James Strachan , Jakob Jenkov

Field Summary
protected  java.util.List children
          Stores the child tree nodes
 
Fields inherited from class org.dom4j.swing.LeafTreeNode
EMPTY_ENUMERATION, xmlNode
 
Constructor Summary
BranchTreeNode()
           
BranchTreeNode(Branch xmlNode)
           
BranchTreeNode(javax.swing.tree.TreeNode parent, Branch xmlNode)
           
 
Method Summary
 java.util.Enumeration children()
           
protected  java.util.List 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 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()
           
 
Methods inherited from class org.dom4j.swing.LeafTreeNode
getParent, getXmlNode, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

protected java.util.List children
Stores the child tree nodes

Constructor Detail

BranchTreeNode

public BranchTreeNode()

BranchTreeNode

public BranchTreeNode(Branch xmlNode)

BranchTreeNode

public BranchTreeNode(javax.swing.tree.TreeNode parent,
                      Branch xmlNode)
Method Detail

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode
Overrides:
children in class LeafTreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Overrides:
getAllowsChildren in class LeafTreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode
Overrides:
getChildAt in class LeafTreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Overrides:
getChildCount in class LeafTreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode
Overrides:
getIndex in class LeafTreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class LeafTreeNode

toString

public java.lang.String toString()
Overrides:
toString in class LeafTreeNode

getChildList

protected java.util.List getChildList()
Uses Lazy Initialization pattern to create a List of children

Returns:
DOCUMENT ME!

createChildList

protected java.util.List createChildList()
Factory method to create List of children TreeNodes

Returns:
DOCUMENT ME!

createChildTreeNode

protected javax.swing.tree.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()


Copyright ? 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo