public class FileTreeNode extends AsyncUniqueNode
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
file
File for this node.
|
protected java.lang.String |
name
Custom node name.
|
failureCause, loaderIcon, stateid, ID_PREFIX| Constructor and Description |
|---|
FileTreeNode(java.io.File file)
Constructs file node for the specified file.
|
FileTreeNode(java.io.File file,
java.lang.String name)
Constructs file node for the specified file with custom name.
|
| 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.
|
java.lang.String |
getName()
Returns custom name for this node.
|
FileTreeNode |
getParent() |
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 |
setName(java.lang.String name)
Sets custom name for this node.
|
java.lang.String |
toString()
Returns text node representation.
|
createLoaderIcon, getFailureCause, getLoaderIcon, 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, setUserObjectprotected java.io.File file
protected java.lang.String name
public FileTreeNode(java.io.File file)
file - node filepublic FileTreeNode(java.io.File file,
java.lang.String name)
file - node filename - custom node namepublic java.lang.String getId()
getId in class UniqueNodepublic java.io.File getFile()
public void setFile(java.io.File file)
file - file for this nodepublic java.lang.String getName()
public void setName(java.lang.String name)
name - 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()
toString in class UniqueNode