Search in sources :

Example 1 with FunctionChildrenTreeNode

use of com.revolsys.swing.tree.node.FunctionChildrenTreeNode in project com.revolsys.open by revolsys.

the class PathTreeNode method newFileSystemsTreeNode.

public static BaseTreeNode newFileSystemsTreeNode() {
    final BaseTreeNode fileSystems = new FunctionChildrenTreeNode(FileSystems.getDefault(), "File Systems", getIconFolder("drive"), (fileSystem) -> {
        final Iterable<Path> roots = ((FileSystem) fileSystem).getRootDirectories();
        return getPathNodes(roots, true);
    });
    fileSystems.setOpen(true);
    return fileSystems;
}
Also used : Path(java.nio.file.Path) FileSystem(java.nio.file.FileSystem) BaseTreeNode(com.revolsys.swing.tree.BaseTreeNode) FunctionChildrenTreeNode(com.revolsys.swing.tree.node.FunctionChildrenTreeNode)

Aggregations

BaseTreeNode (com.revolsys.swing.tree.BaseTreeNode)1 FunctionChildrenTreeNode (com.revolsys.swing.tree.node.FunctionChildrenTreeNode)1 FileSystem (java.nio.file.FileSystem)1 Path (java.nio.file.Path)1