I have a Table with checkboxes. I want to change the selection of the checkbox in the first column when I click on the checkbox in the third or fourth column. I want to be able
Before calling commitEdit
, it is necessary to call getTableView().edit(getTableRow().getIndex(), param)
. This puts the cell into "editing mode". Since there is no startEdit
method, there is very little involved in entering edit mode, but it is still required.
After that, as described here: http://download.oracle.com/javafx/2.0/ui_controls/table-view.htm
It is necessary to call
firstCol.setOnEditCommit(new EventHandler>() {
@Override
public void handle(EditEvent event) {
String newValue = event.getNewValue();
ContactOptions data = (ContactOptions) event.getTableView().getItems().get(event.getTablePosition().getRow());
data.one.set(newValue)
if(newValue.equals("No")) {
data.three.set("No");
data.four.set("No");
}
}
}
Now all I need to know is how to update the table's display once the data is updated.