Package be.gaudry.swing.file.utils
Class FileTreeNode
java.lang.Object
be.gaudry.swing.file.utils.FileTreeNode
- All Implemented Interfaces:
TreeNode
- Since:
- 1.0 Aug 27, 2009
- Author:
- Steph GAUDRY
-
Constructor Summary
ConstructorDescriptionFileTreeNode(File[] children)
Creates a new file tree node.FileTreeNode(File file, boolean isFileSystemRoot, TreeNode parent)
Creates a new file tree node. -
Method Summary
Modifier and TypeMethodDescriptionchildren()
boolean
getChildAt(int childIndex)
int
getFile()
int
boolean
boolean
isLeaf()
void
void
setFileSystemRoot(boolean isFileSystemRoot)
-
Constructor Details
-
FileTreeNode
Creates a new file tree node.- Parameters:
file
- Node fileisFileSystemRoot
- Indicates whether the file is a file system root.parent
- Parent node.
-
FileTreeNode
Creates a new file tree node.- Parameters:
children
- Children files.
-
-
Method Details
-
children
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceTreeNode
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceTreeNode
-
getIndex
-
getParent
-
isLeaf
public boolean isLeaf() -
setFile
- Parameters:
file
- the file to set
-
getFile
- Returns:
- the file
-
setFileSystemRoot
public void setFileSystemRoot(boolean isFileSystemRoot)- Parameters:
isFileSystemRoot
- the isFileSystemRoot to set
-
isFileSystemRoot
public boolean isFileSystemRoot()- Returns:
- the isFileSystemRoot
-