Community
Participate
Working Groups
FilterableTreeItem overrides TreeItem#isLeaf. This is a temporary workaround until RT-40790 [1] has been adressed and should be removed/refactored when the problem is solved. Without this workaround TreeView does not recognize empty folders (after filtering) as leaves and will still display the expand/collapse controls next to the tree item. The reason behind this is that the leafProperty is hooked internaly to the source list and not to the filtered list. [1]: https://javafx-jira.kenai.com/browse/RT-40790
FilterableTreeItem no longer overrides isLeaf() but uses reflection to manipulate the private field "children" of TreeItem. This can be refactored if the JavaFX issue JDK-8091687 [1] gets resolved. [1]: https://bugs.openjdk.java.net/browse/JDK-8091687