|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode com.alee.laf.tree.UniqueNode
public class UniqueNode
This class provides a custom node with a specific ID. This node is used in various WebLookAndFeel tree components to properly save selections and expansion states. This node might also be used for some advanced cases like asynchronous tree.
Field Summary | |
---|---|
protected java.lang.String |
id
Unique node ID. |
protected static java.lang.String |
ID_PREFIX
Prefix for node ID. |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
UniqueNode()
Costructs a simple node. |
|
UniqueNode(java.lang.Object userObject)
Costructs a node with a specified user object. |
Method Summary | |
---|---|
java.lang.String |
getId()
Returns node ID and creates it if it doesn't exist. |
UniqueNode |
getParent()
|
javax.swing.tree.TreePath |
getTreePath()
Returns TreePath for this node. |
protected void |
setId()
Changes node ID to new random ID. |
void |
setId(java.lang.String id)
Changes node ID. |
java.lang.String |
toString()
Returns text node representation. |
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, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ID_PREFIX
protected java.lang.String id
Constructor Detail |
---|
public UniqueNode()
public UniqueNode(java.lang.Object userObject)
userObject
- custom user objectMethod Detail |
---|
public java.lang.String getId()
public void setId(java.lang.String id)
id
- new node IDprotected void setId()
public UniqueNode getParent()
getParent
in interface javax.swing.tree.TreeNode
getParent
in class javax.swing.tree.DefaultMutableTreeNode
public javax.swing.tree.TreePath getTreePath()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |