|
@@ -15,11 +15,19 @@ public class Dialogs {
|
|
|
|
|
|
private Dialogs() {}
|
|
|
|
|
|
- public static void showRemoveVaultDialog(SimpleDialog.Builder simpleDialogProvider, Stage mainWindow, Vault vault, ObservableList<Vault> vaults) {
|
|
|
- simpleDialogProvider.setOwner(mainWindow).setTitleKey("removeVault.title", vault.getDisplayName()).setMessageKey("removeVault.message").setDescriptionKey("removeVault.description").setIcon(FontAwesome5Icon.QUESTION).setOkButtonKey("removeVault.confirmBtn").setCancelButtonKey("generic.button.cancel").setOkAction(v -> {
|
|
|
- LOG.debug("Removing vault {}.", vault.getDisplayName());
|
|
|
- vaults.remove(vault);
|
|
|
- v.close();
|
|
|
- }).build().showAndWait();
|
|
|
+ public static void showRemoveVaultDialog(SimpleDialog.Builder simpleDialogBuilder, Stage mainWindow, Vault vault, ObservableList<Vault> vaults) {
|
|
|
+ simpleDialogBuilder.setOwner(mainWindow) //
|
|
|
+ .setTitleKey("removeVault.title", vault.getDisplayName()) //
|
|
|
+ .setMessageKey("removeVault.message") //
|
|
|
+ .setDescriptionKey("removeVault.description") //
|
|
|
+ .setIcon(FontAwesome5Icon.QUESTION) //
|
|
|
+ .setOkButtonKey("removeVault.confirmBtn") //
|
|
|
+ .setCancelButtonKey("generic.button.cancel") //
|
|
|
+ .setOkAction(v -> {
|
|
|
+ LOG.debug("Removing vault {}.", vault.getDisplayName());
|
|
|
+ vaults.remove(vault);
|
|
|
+ v.close();
|
|
|
+ }) //
|
|
|
+ .build().showAndWait();
|
|
|
}
|
|
|
}
|