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

Public extensions of TreeCell do not render their item's graphic attribute

    XMLWordPrintable

    Details

      Description

      The public extensions of TreeCell (CheckBoxTreeCell, ChoiceBoxTreeCell, ComboBoxTreeCell and TextFieldTreeCell) do not render their item's graphic attribute.
      The documentation says that ChoiceBoxTreeCell, ComboBoxTreeCell and TextFieldTreeCell are rendered as a Label and that CheckBoxTreeCell is rendered as a CheckBox. The Label and CheckBox implementations render their graphic attribute.

      For the first three components, the problem lies within the CellUtils' updateItem() methods, I think. In the last line it says cell.setGraphic(null) which should probably be cell.setGraphic(cell.getTreeItem().getGraphic()) instead.

      For the last component, the item's graphic is never passed to the underlying checkBox.

      The attached source code contains a Label and a TreeView with TextFieldTreeCells. The Label and the root TreeItem have a red filled circle as the graphic. It is only rendered by the Label though. See the attached screenshot.

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved:
              Imported: