aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Rogetzer <e1627756@student.tuwien.ac.at>2018-06-17 16:13:14 +0200
committerTharre <tharre3@gmail.com>2018-06-17 19:50:47 +0200
commitb2684782f1a385cec6c4de4297298cc8435c7697 (patch)
tree685e9dbee1d5a825f6a7a97f83d98041f3637636
parent77b66ff9e2b22ff8e869671f4a16caf0c5b02fe5 (diff)
downloadsepm-groupproject-b2684782f1a385cec6c4de4297298cc8435c7697.tar.gz
sepm-groupproject-b2684782f1a385cec6c4de4297298cc8435c7697.tar.xz
sepm-groupproject-b2684782f1a385cec6c4de4297298cc8435c7697.zip
Create methods for displaying validation- and service errors [#25963]
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/Helper.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/Helper.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/Helper.java
index 077c57a..17d2019 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/Helper.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/Helper.java
@@ -6,8 +6,19 @@ import javafx.scene.control.ButtonType;
class Helper {
+ private static final String ALERT_TITLE_VALIDATION_ERROR = "Validierungsfehler";
+ private static final String ALERT_TITLE_SERVICE_EXCEPTION = "Fehler";
+
private Helper() {} // SonarLint insisted to create a private constructor to hide the public one
+ static void showValidationErrorAlertAndWait(String message) {
+ showAlertWithOkButtonAndWait(AlertType.ERROR, ALERT_TITLE_VALIDATION_ERROR, message);
+ }
+
+ static void showServiceExceptionAlertAndWait(String message) {
+ showAlertWithOkButtonAndWait(AlertType.ERROR, ALERT_TITLE_SERVICE_EXCEPTION, message);
+ }
+
static void showAlertWithOkButtonAndWait(
AlertType alertType, String headerText, String contentText) {
Alert alert = new Alert(alertType, contentText, ButtonType.OK);