org.geotoolkit.gui.swing.tree
Interface TreeNode

All Superinterfaces:
TreeNode
All Known Subinterfaces:
MutableTreeNode, TreeTableNode
All Known Implementing Classes:
MetadataTreeNode

public interface TreeNode
extends TreeNode

Defines the requirements for an object that can be used as a tree node in a JTree. This interface adds the getUserObject() to Swing interface, which seems to have been forgotten in J2SE.

Since:
2.0
Version:
3.03
Author:
Martin Desruisseaux (IRD)
Module:
utility/geotk-utility (download)    View source code for this class

Method Summary
 Enumeration<? extends TreeNode> children()
          Returns the children of this node as an Enumeration.
 Object getUserObject()
          Returns this node's user object.
 String toString()
          Returns a string representation of this node suitable for a user interface.
 
Methods inherited from interface TreeNode
getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Method Detail

getUserObject

Object getUserObject()
Returns this node's user object.

Returns:
the Object stored at this node by the user

children

Enumeration<? extends TreeNode> children()
Returns the children of this node as an Enumeration.

Specified by:
children in interface TreeNode
Returns:
The children.

toString

String toString()
Returns a string representation of this node suitable for a user interface. JTree uses this method for formatting the text to display in the widget.

Overrides:
toString in class Object
Returns:
The text to display in the JTree for this node.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.