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
ConstructorsConstructorDescriptionFileTreeNode(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()booleangetChildAt(int childIndex)intgetFile()intbooleanbooleanisLeaf()voidvoidsetFileSystemRoot(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:
getAllowsChildrenin interfaceTreeNode
-
getChildAt
- Specified by:
getChildAtin interfaceTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCountin 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
-