com.alee.extended.tree.sample
Class SampleNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.alee.laf.tree.UniqueNode
          extended by com.alee.extended.tree.AsyncUniqueNode
              extended by com.alee.extended.tree.sample.SampleNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class SampleNode
extends AsyncUniqueNode

Sample node.

Author:
Mikle Garin
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          Node name to display.
protected  long time
          Time spent to load node childs.
protected  SampleNodeType type
          Node type.
 
Fields inherited from class com.alee.extended.tree.AsyncUniqueNode
failureCause, loaderIcon, state
 
Fields inherited from class com.alee.laf.tree.UniqueNode
id, ID_PREFIX
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
SampleNode(java.lang.String name, SampleNodeType type)
          Constructs sample node.
 
Method Summary
 java.lang.String getName()
          Returns node name.
 long getTime()
          Returns time spent to load node childs.
 SampleNodeType getType()
          Returns node type.
 void setName(java.lang.String name)
          Changes node name.
 void setTime(long time)
          Sets time spent to load node childs.
 void setType(SampleNodeType type)
          Changes node type.
 java.lang.String toString()
          Returns text node representation.
 
Methods inherited from class com.alee.extended.tree.AsyncUniqueNode
createLoaderIcon, getChildAt, getFailureCause, getLoaderIcon, getParent, getState, isFailed, isLoaded, isLoading, isWaiting, setFailureCause, setState
 
Methods inherited from class com.alee.laf.tree.UniqueNode
getId, getTreePath, setId, setId
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, 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, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Node name to display.


type

protected SampleNodeType type
Node type.


time

protected long time
Time spent to load node childs.

Constructor Detail

SampleNode

public SampleNode(java.lang.String name,
                  SampleNodeType type)
Constructs sample node.

Parameters:
name - node name
type - node type
Method Detail

getName

public java.lang.String getName()
Returns node name.

Returns:
node name

setName

public void setName(java.lang.String name)
Changes node name.

Parameters:
name - new node name

getType

public SampleNodeType getType()
Returns node type.

Returns:
node type

setType

public void setType(SampleNodeType type)
Changes node type.

Parameters:
type - new node type

getTime

public long getTime()
Returns time spent to load node childs.

Returns:
time spent to load node childs

setTime

public void setTime(long time)
Sets time spent to load node childs.

Parameters:
time - new time spent to load node childs

toString

public java.lang.String toString()
Returns text node representation.

Overrides:
toString in class UniqueNode
Returns:
text node representation