use of com.negativevr.media_library.storage.FilePathTreeItem in project Media-Library by The-Rain-Goddess.
the class ApplicationWindow method updateFileSystem.
private void updateFileSystem() {
System.out.println("Updating File System...");
rootNode.getChildren().clear();
Iterable<Path> rootDirectories = getDirectories(rootPath);
for (Path name : rootDirectories) {
FilePathTreeItem treeNode = new FilePathTreeItem(name);
rootNode.getChildren().add(treeNode);
//treeNode.setExpanded(true);
}
rootNode.setExpanded(true);
}
use of com.negativevr.media_library.storage.FilePathTreeItem in project Media-Library by The-Rain-Goddess.
the class ApplicationWindow method setupMediaFileBrowser.
//private File Browser mutators / accessors
private VBox setupMediaFileBrowser() {
VBox treeBox = new VBox();
treeBox.setMinHeight(650);
treeBox.setMaxHeight(650);
treeBox.setPadding(new Insets(10, 10, 10, 10));
treeBox.setSpacing(10);
//setup the root directory for file browser
rootNode.setGraphic(new ImageView(new Image("com/negativevr/media_library/res/remove.png")));
Iterable<Path> rootDirectories = getDirectories(rootPath);
//populates the rootNode with Tree Items
for (Path name : rootDirectories) {
FilePathTreeItem treeNode = new FilePathTreeItem(name);
rootNode.getChildren().add(treeNode);
//treeNode.setExpanded(true);
}
rootNode.setExpanded(true);
//create the tree view
TreeView<String> treeView = new TreeView<>(rootNode);
treeView.setMinHeight(600);
//add everything to the tree pane
treeBox.getChildren().addAll(new Label("File browser"), treeView);
return treeBox;
}
Aggregations