public class FileSystemTree.Node extends DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Modifier and Type | Method and Description |
---|---|
void |
expandTo(String path,
TreePath[] full)
Recursive expansion until opening the final element of the path
|
FileSystemTree.Node |
getChildAt(int index) |
int |
getChildCount() |
Icon |
getIcon() |
Object |
getUserObject() |
boolean |
isDirectory() |
boolean |
isLeaf() |
void |
populateChildren(DefaultTreeModel model,
FileFilter file_filter)
If it's a directory, add a Node for each of its visible files.
|
void |
removeAllChildren(DefaultTreeModel model) |
String |
toString() |
void |
updateChildrenList(DefaultTreeModel model,
FileFilter file_filter) |
File[] |
updatedChildrenFiles(boolean sort,
FileFilter file_filter) |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
public Node(String path)
public boolean isDirectory()
public File[] updatedChildrenFiles(boolean sort, FileFilter file_filter)
sort
- file_filter
- Applies to leafs, not to directories.public void populateChildren(DefaultTreeModel model, FileFilter file_filter)
public void expandTo(String path, TreePath[] full)
path
- The absolute file path.full
- A single-slot array containing the full path, if any.public String toString()
toString
in class DefaultMutableTreeNode
public int getChildCount()
getChildCount
in interface TreeNode
getChildCount
in class DefaultMutableTreeNode
public FileSystemTree.Node getChildAt(int index)
getChildAt
in interface TreeNode
getChildAt
in class DefaultMutableTreeNode
public Icon getIcon()
public Object getUserObject()
getUserObject
in class DefaultMutableTreeNode
public boolean isLeaf()
isLeaf
in interface TreeNode
isLeaf
in class DefaultMutableTreeNode
public void removeAllChildren(DefaultTreeModel model)
public void updateChildrenList(DefaultTreeModel model, FileFilter file_filter)
Copyright © 2015–2022 SciJava. All rights reserved.