Search in sources :

Example 1 with ReadOnlyFileNode

use of il.ac.technion.cs.smarthouse.system.file_system.FileSystem.ReadOnlyFileNode in project Smartcity-Smarthouse by TechnionYP5777.

the class MainSystemGuiController method createTree.

private void createTree(ReadOnlyFileNode currNode, TreeItem<String> currTreeNode) {
    TreeItem<String> newTreeNode = new TreeItem<>(currNode.getName());
    if (currNode.isLeaf())
        return;
    for (ReadOnlyFileNode child : currNode.getChildren()) createTree(child, newTreeNode);
    newTreeNode.setExpanded(true);
    currTreeNode.getChildren().add(newTreeNode);
}
Also used : TreeItem(javafx.scene.control.TreeItem) ReadOnlyFileNode(il.ac.technion.cs.smarthouse.system.file_system.FileSystem.ReadOnlyFileNode)

Aggregations

ReadOnlyFileNode (il.ac.technion.cs.smarthouse.system.file_system.FileSystem.ReadOnlyFileNode)1 TreeItem (javafx.scene.control.TreeItem)1