public class FileTreeModel extends DefaultTreeModel
Modifier and Type | Field and Description |
---|---|
protected FileSystemView |
fsv |
protected boolean |
showHiddenFiles |
asksAllowsChildren, listenerList, root
Constructor and Description |
---|
FileTreeModel(FileSystemView fileSystemView) |
FileTreeModel(FileSystemView fileSystemView,
boolean showHiddenFiles,
File... roots) |
FileTreeModel(FileSystemView fileSystemView,
boolean showHiddenFiles,
Path... roots) |
Modifier and Type | Method and Description |
---|---|
protected FileTreeNode |
createNode(FileTreeNode parent,
FileNode fileNode) |
protected FileTreeNode |
createRoot(File... roots) |
protected FileTreeNode |
createRoot(Path... roots) |
FileTreeNode |
getRoot() |
protected void |
init() |
boolean |
isShowHiddenFiles() |
protected void |
register(FileTreeNode node) |
void |
reload() |
void |
setShowHiddenFiles(boolean showHiddenFiles) |
protected void |
unregister(FileTreeNode node) |
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
protected final FileSystemView fsv
protected boolean showHiddenFiles
public FileTreeModel(FileSystemView fileSystemView)
public FileTreeModel(FileSystemView fileSystemView, boolean showHiddenFiles, File... roots)
public FileTreeModel(FileSystemView fileSystemView, boolean showHiddenFiles, Path... roots)
protected void init()
protected FileTreeNode createRoot(Path... roots)
protected FileTreeNode createRoot(File... roots)
public void reload()
reload
in class DefaultTreeModel
public FileTreeNode getRoot()
getRoot
in interface TreeModel
getRoot
in class DefaultTreeModel
public void setShowHiddenFiles(boolean showHiddenFiles)
public boolean isShowHiddenFiles()
protected FileTreeNode createNode(FileTreeNode parent, FileNode fileNode)
protected void register(FileTreeNode node)
protected void unregister(FileTreeNode node)