I'm creating an application in JavaFx. Right now I have two tableviews next to each other:
------------------------------------------------------------------------------
| TableView 1 | TableView 2 |
| | |
| | Entry 1 |
| | Entry 2 |
| | Entry 3 |
| | Entry ... |
| | Entry N |
------------------------------------------------------------------------------
I would like to copy items from TableView 2 to TableView 1, but at the same time, the entries that have been copied from TableView 2 need to be disabled (disable the row with setDisable or something similar). I do know how to copy the items from one tableview to another. The problem is that I do not know how to disable multiple rows when one or multiple entries have been copied to TableView 1. I tried this with a RowFactory, like this:
productsInTransaction.setRowFactory(tv -> {
TableRow<Product> row = new TableRow<>();
row.disableProperty().bind(???);
return row;
});
Any help is much appreciated!