public abstract class AsyncUniqueNode extends UniqueNode implements com.alee.api.IconSupport, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static javax.swing.Icon |
failedStateIcon
Special failed state icon.
|
protected static java.util.Map<javax.swing.Icon,javax.swing.Icon> |
failedStateIcons
User failed icons cache.
|
protected java.lang.Throwable |
failureCause
Children load failure cause.
|
static LoadIconType |
loadIconType
Default load icon type.
|
protected java.awt.image.ImageObserver |
observer
Load icon observer.
|
protected AsyncNodeState |
state
Current async node state.
|
id, ID_PREFIX| Constructor and Description |
|---|
AsyncUniqueNode()
Costructs default node.
|
AsyncUniqueNode(java.lang.Object userObject)
Constructs AsyncUniqueNode with a custom user object.
|
AsyncUniqueNode(java.lang.String id,
java.lang.Object userObject)
Constructs AsyncUniqueNode with a custom user object and node ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachLoadIconObserver(WebAsyncTree tree)
Attaches node load icon observer to the specified async tree.
|
void |
detachLoadIconObserver()
Detaches node load icon observer.
|
AsyncUniqueNode |
getChildAt(int index) |
javax.swing.Icon |
getFailedStateIcon(javax.swing.Icon icon)
Returns failed state icon for this node.
|
java.lang.Throwable |
getFailureCause()
Returns children load failure cause.
|
javax.swing.Icon |
getIcon() |
javax.swing.Icon |
getLoadIcon()
Returns load icon for this node.
|
abstract javax.swing.Icon |
getNodeIcon()
Returns specific icon for this node.
|
AsyncUniqueNode |
getParent() |
AsyncNodeState |
getState()
Returns async node state.
|
boolean |
isFailed()
Returns whether node children load failed or not.
|
boolean |
isLoaded()
Returns whether node children are loaded or not.
|
boolean |
isLoading()
Returns whether node children are being loaded or not.
|
boolean |
isWaiting()
Returns whether node is in waiting state.
|
void |
setFailureCause(java.lang.Throwable failureCause)
Sets children load failure cause.
|
void |
setState(AsyncNodeState state)
Sets async node state.
|
getId, getTreePath, setId, setId, toStringadd, 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, setUserObjectprotected static final javax.swing.Icon failedStateIcon
protected static final java.util.Map<javax.swing.Icon,javax.swing.Icon> failedStateIcons
public static LoadIconType loadIconType
protected AsyncNodeState state
protected java.awt.image.ImageObserver observer
protected java.lang.Throwable failureCause
public AsyncUniqueNode()
public AsyncUniqueNode(java.lang.Object userObject)
userObject - custom user objectpublic AsyncUniqueNode(java.lang.String id,
java.lang.Object userObject)
id - node IDuserObject - custom user objectpublic AsyncNodeState getState()
public boolean isWaiting()
public boolean isLoading()
public boolean isLoaded()
public boolean isFailed()
public void setState(AsyncNodeState state)
state - new async node statepublic java.lang.Throwable getFailureCause()
public void setFailureCause(java.lang.Throwable failureCause)
failureCause - children load failure causepublic javax.swing.Icon getIcon()
getIcon in interface com.alee.api.IconSupportpublic javax.swing.Icon getLoadIcon()
public void attachLoadIconObserver(WebAsyncTree tree)
tree - async treepublic void detachLoadIconObserver()
public abstract javax.swing.Icon getNodeIcon()
public javax.swing.Icon getFailedStateIcon(javax.swing.Icon icon)
icon - node iconpublic AsyncUniqueNode getParent()
getParent in interface javax.swing.tree.TreeNodegetParent in class UniqueNodepublic AsyncUniqueNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class javax.swing.tree.DefaultMutableTreeNode