Commit e8a7f27e authored by Simon Barner's avatar Simon Barner


Issue-Ref: 4029
Issue-Url: Simon Barner's avatarSimon Barner <>
parent 7d39c25b 6760a6dc5721175b1dada8f30fd9da05f7bcc4b3 GREEN 75dc5534b119ffdb3c10a65810c2a0f330b7955e GREEN 928ef4fd5d6171c43d31ea628ded7e338469f5a8 YELLOW b9e68bede4ad0763e4ea3d3c1e7edeb0d63ed261 RED 5e58a31a63f8e56d8c8e69e2c4d095809bc46bf1 YELLOW e9b68607683de279d0cb8712a28dc131c5c33ece GREEN 725f41f4fb4b6bfa813f010fb9083ab02eea164a GREEN
......@@ -156,29 +156,41 @@ public abstract class DynamicTreeTableUIProviderBase<T> {
/** Applies a checkbox editing support to the given checkbox column. */
/* package */ final void applyToCheckboxColumn(int i, TreeTableColumn<T, Boolean> column) {
// TODO (SB): Maybe the following would be safer?
// column.setOnEditCommit(null);
// column.setEditable(isEditable(i));
// if(!isEditable(i)) {
// return;
// }
if(!isEditable(i)) {
// end of previous TODO
// TODO Could we save some memory here and use the same CallBack for all columns (i.e., make
// this a static field of DynamicTreeTableUIProviderBase)?
// setOnEditCommit() does not work for CheckBoxTreeTableCell. This is why a custom
// CellValueFactory has to be set here
column.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<T, Boolean>, //
ObservableValue<Boolean>>() {
/** {@inheritDoc} */
public ObservableValue<Boolean>
call(TreeTableColumn.CellDataFeatures<T, Boolean> param) {
TreeItem<T> treeItem = param.getValue();
T value = treeItem.getValue();
String label = getLabel(value, i);
// TODO (SB) Error handling for values != "true" or "false"
boolean b = Boolean.valueOf(label);
SimpleBooleanProperty booleanProp = new SimpleBooleanProperty(b);
// equal behavior to setOnEditCommit()
// equal behavior as setOnEditCommit()
booleanProp.addListener(new ChangeListener<Boolean>() {
/** {@inheritDoc} */
public void changed(ObservableValue<? extends Boolean> observable,
Boolean oldValue, Boolean newValue) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment