Which method sets checkbox to be unclickable in Javafx?
I've tried code like
public ObservableValue<CheckBox> call(
TableColumn.CellDataFeatures<MyClass, CheckBox> arg0) {
Message m = arg0.getValue();
CheckBox checkBox = new CheckBox();
checkBox.selectedProperty().setValue(m.isSelected());
//checkBox.setClickable(m.isClickable());
checkBox.selectedProperty().addListener(new ChangeListener<Boolean>() {
public void changed(ObservableValue<? extends Boolean> ov,
Boolean old_val, Boolean new_val) {
model.toggleSelection(m, new_val);
}
});
return new SimpleObjectProperty<CheckBox>(checkBox);
}
});
But I can't find the way to conditionally set checkbox greyed out.
Aucun commentaire:
Enregistrer un commentaire