Class FileTreeNode

java.lang.Object
be.gaudry.swing.file.utils.FileTreeNode
All Implemented Interfaces:
TreeNode

public class FileTreeNode extends Object implements TreeNode
Since:
1.0 Aug 27, 2009
Author:
Steph GAUDRY
  • Constructor Details

    • FileTreeNode

      public FileTreeNode(File file, boolean isFileSystemRoot, TreeNode parent)
      Creates a new file tree node.
      Parameters:
      file - Node file
      isFileSystemRoot - Indicates whether the file is a file system root.
      parent - Parent node.
    • FileTreeNode

      public FileTreeNode(File[] children)
      Creates a new file tree node.
      Parameters:
      children - Children files.
  • Method Details

    • children

      public Enumeration<FileTreeNode> children()
      Specified by:
      children in interface TreeNode
    • getAllowsChildren

      public boolean getAllowsChildren()
      Specified by:
      getAllowsChildren in interface TreeNode
    • getChildAt

      public TreeNode getChildAt(int childIndex)
      Specified by:
      getChildAt in interface TreeNode
    • getChildCount

      public int getChildCount()
      Specified by:
      getChildCount in interface TreeNode
    • getIndex

      public int getIndex(TreeNode node)
      Specified by:
      getIndex in interface TreeNode
    • getParent

      public TreeNode getParent()
      Specified by:
      getParent in interface TreeNode
    • isLeaf

      public boolean isLeaf()
      Specified by:
      isLeaf in interface TreeNode
    • setFile

      public void setFile(File file)
      Parameters:
      file - the file to set
    • getFile

      public File getFile()
      Returns:
      the file
    • setFileSystemRoot

      public void setFileSystemRoot(boolean isFileSystemRoot)
      Parameters:
      isFileSystemRoot - the isFileSystemRoot to set
    • isFileSystemRoot

      public boolean isFileSystemRoot()
      Returns:
      the isFileSystemRoot