public class FileSystemTreeNode extends TreeNode<File>
© Copyright 2009 Sans Pareil Technologies, Inc.
initialisedactionCommand, allowsChildren, children, EMPTY_ENUMERATION, parent, userObject| Constructor and Description |
|---|
FileSystemTreeNode()
Default constructor.
|
FileSystemTreeNode(File model)
Create a tree node that represents the specified file.
|
FileSystemTreeNode(File model,
boolean allowsChildren)
Create a tree node that represents the specified file and that allows children based
on the value specified.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createChildren()
Create child nodes that represent the directories under the current directory.
|
int |
getChildCount()
Over-ridden to lazily initialise the child nodes and return the count.
|
boolean |
isLeaf()
Over-ridden to check whether the contents of the directory is readable
or not.
|
String |
toString()
Over-ridden to return just the name of the directory.
|
add, breadthFirstEnumeration, children, depthFirstEnumeration, getActionCommand, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setActionCommand, setAllowsChildren, setParent, setUserObjectpublic FileSystemTreeNode()
public FileSystemTreeNode(File model)
model - The file (usually directory) that is being represented on the tree.public FileSystemTreeNode(File model, boolean allowsChildren)
model - The file (usually directory) that is being displayed on the tree.allowsChildren - Flag that indicates whether the node allows children.public boolean isLeaf()
public int getChildCount()
getChildCount in interface TreeNodegetChildCount in class DefaultMutableTreeNode<File>public String toString()
toString in class DefaultMutableTreeNode<File>protected void createChildren()