Commit 29aa2286 authored by Luna Riegel's avatar Luna Riegel
Browse files

Style: Show a popup that CD is waiting on Schematron

parent 71731362
......@@ -180,6 +180,7 @@ public class CheckDialog {
private CityDoctorController controller;
private FilterPane filterPane;
private MainWindow window;
private IndeterminateSpinnerDialog waitingDialog;
public CheckDialog(MainWindow window, Window parent, CityDoctorController controller) throws IOException {
this.window = window;
......@@ -327,9 +328,14 @@ public class CheckDialog {
homepageHyperlink.setText("[Hyperlink missing/invalid]");
}
try{
waitingDialog = new IndeterminateSpinnerDialog(window.getMainStage(),"Schematron still running, please wait");
} catch (IOException e) {
logger.error("Failed to load IndeterminateSpinnerDialog");
}
}
}
private void setupValueColumns(List<TableColumn<GlobalParameter, ?>> columns) {
......@@ -534,7 +540,12 @@ public class CheckDialog {
ProgressListener l = new ProgressListener() {
@Override
public void updateProgress(float state) {
Platform.runLater(() -> progress.setProgress(state));
Platform.runLater(() -> {
progress.setProgress(state);
if (state < 0 ){
waitingDialog.show();
}
});
}
};
controller.startChecks(config, l);
......@@ -556,6 +567,7 @@ public class CheckDialog {
Platform.runLater(() -> {
checkBtn.setDisable(false);
cancelBtn.setDisable(false);
waitingDialog.hide();
stage.setOnCloseRequest(null);
stage.close();
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment