Class DirectoryTreeNode

java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
smile.swing.tree.DirectoryTreeNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class DirectoryTreeNode extends DefaultMutableTreeNode
A tree node for file directory.
See Also:
  • Constructor Details

    • DirectoryTreeNode

      public DirectoryTreeNode(Path path)
      Constructor.
      Parameters:
      path - the directory path.
  • Method Details

    • path

      public Path path()
      Returns the directory path.
      Returns:
      the directory path.
    • toString

      public String toString()
      Overrides:
      toString in class DefaultMutableTreeNode
    • isLeaf

      public boolean isLeaf()
      Specified by:
      isLeaf in interface TreeNode
      Overrides:
      isLeaf in class DefaultMutableTreeNode
    • addChildren

      public void addChildren(DefaultTreeModel model)
      Adds the child nodes, skipping hidden files (those whose name starts with '.').
      Parameters:
      model - the tree model to insert child nodes into.