Created
April 25, 2017 09:18
-
-
Save ajoydas/8e08af85b0d7fe4a82a05f54faefb030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void mouseClicked(MouseEvent mouseEvent) { | |
FilePathTreeItem item = (FilePathTreeItem) treeView.getSelectionModel().getSelectedItem(); | |
System.out.println(item.getAbsolutePath()); | |
showItems(item); | |
} | |
public class FilePathTreeItem extends TreeItem<String>{ | |
private final File file; | |
@Override | |
public ObservableList<TreeItem<String>> getChildren(){ | |
//System.out.println("Getting Children for "+file.toString()); | |
if(isFirstTimeChildren){ | |
isFirstTimeChildren=false; | |
super.getChildren().setAll(buildChildren(this)); | |
} | |
return(super.getChildren()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment