|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.openswing.swing.tree.java.OpenSwingTreeNode
Title: OpenSwing Framework
Description: This class inherits from DefaultMutableTreeNode: it allows to store userObject too. In fact, serObject is not transient, so it cannot be send through the net using java 1.5/1.6 and Hessian.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Field Summary |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
EMPTY_ENUMERATION |
Constructor Summary | |
OpenSwingTreeNode()
Creates a tree node that has no parent and no children, but which allows children. |
|
OpenSwingTreeNode(java.lang.Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object. |
|
OpenSwingTreeNode(java.lang.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. |
Method Summary | |
java.lang.Object |
getUserObject()
Returns this node's user object. |
void |
setUserObject(java.lang.Object userObject)
Sets the user object for this node to userObject . |
java.lang.String |
toString()
|
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OpenSwingTreeNode()
public OpenSwingTreeNode(java.lang.Object userObject)
userObject
- an Object provided by the user that constitutes
the node's datapublic OpenSwingTreeNode(java.lang.Object userObject, boolean allowsChildren)
userObject
- an Object provided by the user that constitutes
the node's dataallowsChildren
- if true, the node is allowed to have child
nodes -- otherwise, it is always a leaf nodeMethod Detail |
public final void setUserObject(java.lang.Object userObject)
userObject
.
setUserObject
in interface javax.swing.tree.MutableTreeNode
userObject
- the Object that constitutes this node's
user-specified datagetUserObject()
,
toString()
public final java.lang.Object getUserObject()
setUserObject(java.lang.Object)
,
toString()
public final java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |