net.sourceforge.pmd.util.viewer.model
Class SimpleNodeTreeNodeAdapter

java.lang.Object
  extended by net.sourceforge.pmd.util.viewer.model.SimpleNodeTreeNodeAdapter
All Implemented Interfaces:
javax.swing.tree.TreeNode

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

provides the adapter for the tree model

Version:
$Id$
Author:
Boris Gruschko ( boris at gruschko.org )

Constructor Summary
SimpleNodeTreeNodeAdapter(SimpleNodeTreeNodeAdapter parent, SimpleNode node)
          constructs the node
 
Method Summary
 java.util.Enumeration<javax.swing.tree.TreeNode> children()
           
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 SimpleNode getSimpleNode()
          retrieves the underlying node
 boolean isLeaf()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleNodeTreeNodeAdapter

public SimpleNodeTreeNodeAdapter(SimpleNodeTreeNodeAdapter parent,
                                 SimpleNode node)
constructs the node

Parameters:
node - underlying AST's node
Method Detail

getSimpleNode

public SimpleNode getSimpleNode()
retrieves the underlying node

Returns:
AST node

getChildAt

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

getChildCount

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

getParent

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

getIndex

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

getAllowsChildren

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

isLeaf

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

children

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

toString

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


Copyright © 2002-2011 InfoEther. All Rights Reserved.