File tree Expand file tree Collapse file tree 2 files changed +133
-78
lines changed
src/main/java/com/airsquared/blobsaver Expand file tree Collapse file tree 2 files changed +133
-78
lines changed Original file line number Diff line number Diff line change 2525import javafx .application .Platform ;
2626import javafx .collections .FXCollections ;
2727import javafx .event .ActionEvent ;
28+ import javafx .event .Event ;
2829import javafx .event .EventHandler ;
2930import javafx .fxml .FXML ;
3031import javafx .scene .control .*;
@@ -925,6 +926,27 @@ public void goButtonHandler() {
925926 }
926927 }
927928
929+ private Alert runningAlert ;
930+
931+ void showRunningAlert () {
932+ runningAlert = new Alert (Alert .AlertType .INFORMATION );
933+ runningAlert .setTitle ("" );
934+ runningAlert .setHeaderText ("Saving blobs... " );
935+ runningAlert .getDialogPane ().setContent (new ProgressBar ());
936+ Shared .forEachButton (runningAlert , button -> button .setDisable (true ));
937+ runningAlert .getDialogPane ().getScene ().getWindow ().setOnCloseRequest (Event ::consume );
938+ runningAlert .show ();
939+ }
940+
941+ void hideRunningAlert () {
942+ if (runningAlert != null ) {
943+ Shared .forEachButton (runningAlert , button -> button .setDisable (false ));
944+ runningAlert .getDialogPane ().getScene ().getWindow ().setOnCloseRequest (null );
945+ runningAlert .close ();
946+ runningAlert = null ;
947+ }
948+ }
949+
928950 private static boolean isTextFieldInvalid (CheckBox checkBox , TextField textField ) {
929951 return isTextFieldInvalid (checkBox .isSelected (), textField );
930952 }
You can’t perform that action at this time.
0 commit comments