-
Bug
-
Resolution: Fixed
-
P3
-
7u6
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.
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.