public class SampleNode extends AsyncUniqueNode implements java.lang.Cloneable, com.alee.api.IconSupport, com.alee.api.TitleSupport
| Modifier and Type | Field and Description |
|---|---|
protected long |
time
Time spent to load node children.
|
protected java.lang.String |
title
Node title to display.
|
protected SampleNodeType |
type
Node type.
|
failedStateIcon, failedStateIcons, failureCause, loadIconType, observer, stateid, ID_PREFIX| Constructor and Description |
|---|
SampleNode(SampleNodeType type,
java.lang.String title)
Constructs sample node.
|
| Modifier and Type | Method and Description |
|---|---|
SampleNode |
clone() |
javax.swing.Icon |
getNodeIcon()
Returns specific icon for this node.
|
long |
getTime()
Returns time spent to load node children.
|
java.lang.String |
getTitle()
Returns node name.
|
SampleNodeType |
getType()
Returns node type.
|
void |
setTime(long time)
Sets time spent to load node children.
|
void |
setTitle(java.lang.String title)
Changes node name.
|
void |
setType(SampleNodeType type)
Changes node type.
|
java.lang.String |
toString()
Returns text node representation.
|
attachLoadIconObserver, detachLoadIconObserver, getChildAt, getFailedStateIcon, getFailureCause, getIcon, getLoadIcon, getParent, getState, isFailed, isLoaded, isLoading, isWaiting, setFailureCause, setStategetId, getTreePath, setId, setIdadd, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, 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, setUserObjectprotected SampleNodeType type
protected java.lang.String title
protected long time
public SampleNode(SampleNodeType type, java.lang.String title)
type - node typetitle - node namepublic SampleNodeType getType()
public void setType(SampleNodeType type)
type - new node typepublic javax.swing.Icon getNodeIcon()
AsyncUniqueNodegetNodeIcon in class AsyncUniqueNodepublic java.lang.String getTitle()
getTitle in interface com.alee.api.TitleSupportpublic void setTitle(java.lang.String title)
title - new node namepublic long getTime()
public void setTime(long time)
time - new time spent to load node childrenpublic java.lang.String toString()
UniqueNodetoString in class UniqueNodepublic SampleNode clone()
clone in class javax.swing.tree.DefaultMutableTreeNode