Bug 467483 - [controls] FilterableTreeItem - remove reflection hack when JDK-8091687 is fixed
Summary: [controls] FilterableTreeItem - remove reflection hack when JDK-8091687 is fixed
Status: UNCONFIRMED
Alias: None
Product: Efxclipse
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-18 04:31 EDT by Christoph Keimel CLA
Modified: 2015-11-25 07:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Keimel CLA 2015-05-18 04:31:01 EDT
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
Comment 1 Christoph Keimel CLA 2015-11-25 07:55:46 EST
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