| java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.geotools.gui.swing.tree.DefaultMutableTreeNode org.geotools.gui.swing.tree.NamedTreeNode
NamedTreeNode | public class NamedTreeNode extends DefaultMutableTreeNode (Code) | | A tree node with a name which may be different than the user object. The
JTree component invokes the
NamedTreeNode.toString method for populating the tree widget. This class
overrides the default implementation (
NamedTreeNode.getUserObject userObject .toString )
with a custom label.
since: 2.0 version: $Id: NamedTreeNode.java 20883 2006-08-07 13:48:09Z jgarnett $ author: Martin Desruisseaux |
Constructor Summary | |
public | NamedTreeNode(String name) Creates a tree node that has no parent and no children, but which allows children. | public | NamedTreeNode(String name, Object userObject) Creates a tree node with no parent, no children, but which allows
children, and initializes it with the specified user object. | public | NamedTreeNode(String name, Object userObject, boolean allowsChildren) Creates a tree node with no parent, no children, initialized with
the specified user object, and that allows children only if specified. |
NamedTreeNode | public NamedTreeNode(String name)(Code) | | Creates a tree node that has no parent and no children, but which allows children.
Parameters: name - The node name to be returned by NamedTreeNode.toString. |
NamedTreeNode | public NamedTreeNode(String name, Object userObject)(Code) | | Creates a tree node with no parent, no children, but which allows
children, and initializes it with the specified user object.
Parameters: name - The node name to be returned by NamedTreeNode.toString. Parameters: userObject - an Object provided by the user that constitutes the node's data |
NamedTreeNode | public NamedTreeNode(String name, Object userObject, boolean allowsChildren)(Code) | | Creates a tree node with no parent, no children, initialized with
the specified user object, and that allows children only if specified.
Parameters: name - The node name to be returned by NamedTreeNode.toString. Parameters: userObject - an Object provided by the user that constitutes the node's data Parameters: allowsChildren - if true, the node is allowed to have child nodes -- otherwise,it is always a leaf node |
toString | public String toString()(Code) | | Returns this node label. This method is invoked by
JTree for populating
the tree widget.
|
|
|