Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088667

TreeCell does not listen to TreeItem.setGraphic()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P3 P3
    • 9
    • 8u40
    • javafx

      When calling TreeItem.setValue(), the TreeCell will be updated (see com.sun.javafx.scene.control.skin.TreeViewSkin#rootListener) This is not the case when calling TreeItem.setGraphic().

      UseCase: I've got an expensive icon loading process which loads the icons for the TreeItems in the background. Current workaround:

      treeItem.setGraphic(new ImageView(image));
      Event.fireEvent(treeItem, new TreeItem.TreeModificationEvent<>(TreeItem.valueChangedEvent(), treeItem, treeItem.getValue()))

            jgiles Jonathan Giles
            sczymmeckjfx Steffen Czymmeck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: