Class DirectoryTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
smile.swing.tree.DirectoryTreeNode
- All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
A tree node for file directory.
- See Also:
-
Field Summary
Fields inherited from class DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildren(DefaultTreeModel model) Adds the child nodes, skipping hidden files (those whose name starts with '.').booleanisLeaf()path()Returns the directory path.toString()Methods inherited from class DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, 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, setAllowsChildren, setParent, setUserObject
-
Constructor Details
-
DirectoryTreeNode
-
-
Method Details
-
path
-
toString
- Overrides:
toStringin classDefaultMutableTreeNode
-
isLeaf
public boolean isLeaf()- Specified by:
isLeafin interfaceTreeNode- Overrides:
isLeafin classDefaultMutableTreeNode
-
addChildren
Adds the child nodes, skipping hidden files (those whose name starts with '.').- Parameters:
model- the tree model to insert child nodes into.
-