I'm new to JavaFX 8 and tried to implement a TreeTableView with some jfxtras controls in my second and third column. Therefore I set up the cell factories of those columns with custom TreeCells e.g. like this:
col3.setCellFactory(new Callback<TreeTableColumn<Object, String>, TreeTableCell<Object, String>>() {
@Override
public TreeTableCell<Object, String> call(TreeTableColumn<Object, String> param) {
TreeTableCell<Object, String> cell = new TreeTableCell<Object, String>() {
private ColorPicker colorPicker = new ColorPicker();
@Override
protected void updateItem(String t, boolean bln) {
super.updateItem(t, bln);
setGraphic(colorPicker);
}
};
return cell;
}
});
Now I can see the ColorPickers and can use them, but the column somehow does not react on expanding or collapsing the nodes of column 1 (which shows String information out of POJOs). So e.g. if I collapse the whole tree, the third column still shows all ColorPickers.
So what else is necessary to get the columns 'synced'?
Thank you!!