Package eu.bandm.tools.util.files
Class FileTree.Visitor
java.lang.Object
eu.bandm.tools.util.files.FileVisitor
eu.bandm.tools.util.files.FileTree.Visitor
- Enclosing class:
FileTree
Translates all visited files into a Swing tree node and
collects them into the node of the containing directory.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) DefaultMutableTreeNode
Node representing the currently visited directory.(package private) DefaultMutableTreeNode
Node representing the top-most visited directory.Fields inherited from class eu.bandm.tools.util.files.FileVisitor
errorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) DefaultMutableTreeNode
Service Access Point: Visit the given file and all its descendants, and return the corresponding swing tree node.void
Worker methode, overridden here and called by the superclass.Methods inherited from class eu.bandm.tools.util.files.FileVisitor
visitDir_post, visitDir_pre, visitNonDir
-
Field Details
-
top
Node representing the top-most visited directory. -
currentNode
DefaultMutableTreeNode currentNodeNode representing the currently visited directory. New file nodes are stored here.
-
-
Constructor Details
-
Visitor
public Visitor()Only constructor
-
-
Method Details
-
process
Service Access Point: Visit the given file and all its descendants, and return the corresponding swing tree node.- Parameters:
f
- the file where to start the tree generation process- Returns:
- the Swing graphics which corresponds to the given file tree
-
visit
Worker methode, overridden here and called by the superclass. Central entry method.
Is called for applying the visitor. Normally it will not be overwritten. Calls directlyFileVisitor.visitNonDir(File)
orFileVisitor.visitDir(File)
, depending on the type of the file.- Overrides:
visit
in classFileVisitor
- Parameters:
f
- position in the file system from which visiting shall descend.
-