com.antelmann.io
Class FileTreeNode
java.lang.Object
com.antelmann.io.FileTreeNode
- All Implemented Interfaces:
- Serializable, TreeNode
- Direct Known Subclasses:
- DirectoryTreeNode
public class FileTreeNode
- extends Object
- implements TreeNode, Serializable
FileTreeNode implements a TreeNode that can be used to visualize
a file structure. Both, directories and files are visible by default.
Optionally, a FileFilter can be used to restrict the files in the tree.
- Author:
- Holger Antelmann
- See Also:
DirectoryTreeNode,
JTree,
DefaultTreeModel,
Serialized Form
FileTreeNode
public FileTreeNode(File file)
- initializes the FileTreeNode with the given file
FileTreeNode
public FileTreeNode(File file,
FileFilter filter)
- initializes the FileTreeNode with the given file and filter
refresh
public void refresh()
getFile
public File getFile()
getFilter
public FileFilter getFilter()
children
public Enumeration children()
- Specified by:
children in interface TreeNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount 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
getIndex
public int getIndex(TreeNode node)
- Specified by:
getIndex in interface TreeNode
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf in interface TreeNode
getParent
public TreeNode getParent()
- Specified by:
getParent in interface TreeNode
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads