mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-22 04:31:27 +00:00
renamed property
This commit is contained in:
@@ -16,7 +16,8 @@ public class SimpleDialogController implements FxController {
|
||||
private final String cancelButtonText;
|
||||
private final Runnable okAction;
|
||||
private final Runnable cancelAction;
|
||||
private final BooleanProperty dismissed = new SimpleBooleanProperty();
|
||||
private final BooleanProperty cancelButtonVisible = new SimpleBooleanProperty(true);
|
||||
|
||||
|
||||
public SimpleDialogController(String message, String description, FontAwesome5Icon icon, String okButtonText, String cancelButtonText, Runnable okAction, Runnable cancelAction) {
|
||||
this.message = message;
|
||||
@@ -26,12 +27,18 @@ public class SimpleDialogController implements FxController {
|
||||
this.cancelButtonText = cancelButtonText;
|
||||
this.okAction = okAction;
|
||||
this.cancelAction = cancelAction;
|
||||
this.cancelButtonVisible.set(cancelButtonText != null && !cancelButtonText.isEmpty());
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
dismissed.set(cancelButtonText == null || cancelButtonText.isEmpty());
|
||||
|
||||
public BooleanProperty cancelButtonVisibleProperty() {
|
||||
return cancelButtonVisible;
|
||||
}
|
||||
|
||||
public boolean isCancelButtonVisible(){
|
||||
return cancelButtonVisible.get();
|
||||
}
|
||||
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
@@ -52,11 +59,6 @@ public class SimpleDialogController implements FxController {
|
||||
return cancelButtonText;
|
||||
}
|
||||
|
||||
@FXML
|
||||
public boolean getDismissed() {
|
||||
return dismissed.get();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void handleOk() {
|
||||
if (okAction != null) {
|
||||
|
||||
Reference in New Issue
Block a user