-
Type:
Enhancement
-
Resolution: Not an Issue
-
Priority:
P4
-
None
-
Affects Version/s: 8
-
Component/s: javafx
-
Environment:
Java8 u20
On the following code, I would like to show a CheckBox only on the leaf node.
But actually, the root node (TreeItem) has a ChockBox too.
TreeItem rootItem = new TreeItem<>("root");
CheckBoxTreeItem leafItem = new CheckBoxTreeItem<>("leaf");
rootItem.getChildren().addAll(leafItem);
TreeView treeView = new TreeView(rootItem);
treeView.setCellFactory(CheckBoxTreeCell.forTreeView());
But actually, the root node (TreeItem) has a ChockBox too.
TreeItem rootItem = new TreeItem<>("root");
CheckBoxTreeItem leafItem = new CheckBoxTreeItem<>("leaf");
rootItem.getChildren().addAll(leafItem);
TreeView treeView = new TreeView(rootItem);
treeView.setCellFactory(CheckBoxTreeCell.forTreeView());