Update TreeView item graphic

Peter Penzov peter.penzov at gmail.com
Fri Jan 16 12:06:31 UTC 2015


Hi All,
   I can't update dynamically TreeView item graphic when I try to set new
image:

ImageView imgViesw = new ImageView(new
Image(DataTabs.class.getResource("/images/Misc-Database-3-icon.png").toExternalForm()));

                                treeItem.setGraphic(null);
                                treeItem.setGraphic(imgViesw);

First I generate TreeView with Items using custom Graphics for for tree
nodes. This works well.

Then I use JavaFX service to iterate the tree nodes and change the icons
based on some condition(active/not-active).

But the images are not updated.

I use Java 8u40b21. Is this a known bug?

BR,
Peter


More information about the openjfx-dev mailing list