public class FileTreeNode extends AsyncUniqueNode implements com.alee.api.IconSupport, com.alee.api.TitleSupport
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
file
File for this node.
|
static java.lang.String |
rootId
Root node ID.
|
protected java.lang.String |
title
Custom node title.
|
failedStateIcon, failedStateIcons, failureCause, loadIconType, observer, stateid, ID_PREFIX| Constructor and Description |
|---|
FileTreeNode(java.io.File file)
Constructs file node for the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
FileTreeNode |
getChildAt(int index) |
java.io.File |
getFile()
Returns file for this node.
|
java.lang.String |
getId()
Returns node ID and creates it if it doesn't exist.
|
javax.swing.Icon |
getNodeIcon()
Returns specific icon for this node.
|
FileTreeNode |
getParent() |
java.lang.String |
getTitle() |
int |
indexOfFileChild(java.io.File file)
Returns index of child node with the specified file.
|
void |
setFile(java.io.File file)
Sets file for this node.
|
void |
setTitle(java.lang.String title)
Sets custom name for this node.
|
java.lang.String |
toString()
Returns text node representation.
|
attachLoadIconObserver, detachLoadIconObserver, getFailedStateIcon, getFailureCause, getIcon, getLoadIcon, getState, isFailed, isLoaded, isLoading, isWaiting, setFailureCause, setStategetTreePath, setId, setIdadd, 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, setUserObjectpublic static final java.lang.String rootId
protected java.io.File file
protected java.lang.String title
public FileTreeNode(java.io.File file)
file - node filepublic java.lang.String getId()
UniqueNodegetId in interface com.alee.api.IdentifiablegetId in class UniqueNodepublic java.io.File getFile()
public void setFile(java.io.File file)
file - file for this nodepublic 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 - custom name for this nodepublic FileTreeNode getParent()
getParent in interface javax.swing.tree.TreeNodegetParent in class AsyncUniqueNodepublic FileTreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AsyncUniqueNodepublic int indexOfFileChild(java.io.File file)
file - file to search for in child nodespublic java.lang.String toString()
UniqueNodetoString in class UniqueNode