Good day. Began to learn JavaFX. I can not figure out how to remove / add the selected attribute from the checkboxes in the listView, at the moment I can only get what the user has chosen. Here is the piece of code that was used.
listView.setCellFactory(CheckBoxListCell.forListView(new Callback<String, ObservableValue<Boolean>>() { @Override public ObservableValue<Boolean> call(String item) { BooleanProperty observable = new SimpleBooleanProperty(); observable.addListener((obs, wasSelected, isNowSelected) -> System.out.println("CheckBox для " + item + " изменен с " + wasSelected + " в " + isNowSelected) ); return observable; } }));