org.dom4j.swing
Class LeafTreeNode

java.lang.Object
  extended by org.dom4j.swing.LeafTreeNode
All Implemented Interfaces:
javax.swing.tree.TreeNode
Direct Known Subclasses:
BranchTreeNode

public class LeafTreeNode
extends java.lang.Object
implements javax.swing.tree.TreeNode

LeafTreeNode implements the Swing TreeNode interface to bind a leaf XML nodes to a Swing TreeModel.

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

Field Summary
protected static java.util.Enumeration EMPTY_ENUMERATION
           
protected  Node xmlNode
          The dom4j Node which contains the
 
Constructor Summary
LeafTreeNode()
           
LeafTreeNode(Node xmlNode)
           
LeafTreeNode(javax.swing.tree.TreeNode parent, Node xmlNode)
           
 
Method Summary
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 Node getXmlNode()
           
 java.util.Enumeration children()
           
 boolean isLeaf()
           
 void setParent(LeafTreeNode parent)
          Sets the parent of this node but doesn't change the parents children
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ENUMERATION

protected static final java.util.Enumeration EMPTY_ENUMERATION

xmlNode

protected Node xmlNode
The dom4j Node which contains the

Constructor Detail

LeafTreeNode

public LeafTreeNode()

LeafTreeNode

public LeafTreeNode(Node xmlNode)

LeafTreeNode

public LeafTreeNode(javax.swing.tree.TreeNode parent,
                    Node xmlNode)
Method Detail

children

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

getAllowsChildren

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

getChildAt

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

getChildCount

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

getIndex

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

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

isLeaf

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

toString

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

setParent

public void setParent(LeafTreeNode parent)
Sets the parent of this node but doesn't change the parents children

Parameters:
parent - DOCUMENT ME!

getXmlNode

public Node getXmlNode()


Copyright © 2001-2010. All Rights Reserved.