I have a TableView
with a CheckBoxTableCell
column.
I would like to catch the selection of the cell and change the Cursor to Cursor.WAIT
.
Clicking the cell will cause some db-query to happen, that will take a few seconds. I would like to notify the user that something is going on and the application did not just die.
@FXML
private TableColumn<IOrigin, Boolean> cActive;
@Override
public void initialize(final URL location, final ResourceBundle resources) {
cActive.setCellFactory(tc -> new CheckBoxTableCell<>());
[..]
}
Listening on CheckBoxTableCell#selectedProperty()
does not work, it does not fire any change events.
The column cells are bound to a bean property via fxml.
<TableColumn text="Active" editable="true" fx:id="cActive">
<cellValueFactory>
<PropertyValueFactory property="active" />
/cellValueFactory>
</TableColumn>