From 6fe7cb06c1e592c3ac961055a7b8c47ad68ef1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20K=C3=BChn?= Date: Thu, 25 Nov 2021 21:12:45 +0100 Subject: [PATCH] added abort button --- hellofx/app/src/main/java/client/MainController.java | 10 +++++++++- hellofx/app/src/main/resources/client/create-event.css | 10 ++++++++++ .../app/src/main/resources/client/create-event.fxml | 7 +++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/hellofx/app/src/main/java/client/MainController.java b/hellofx/app/src/main/java/client/MainController.java index 4800fb8..793d94c 100644 --- a/hellofx/app/src/main/java/client/MainController.java +++ b/hellofx/app/src/main/java/client/MainController.java @@ -10,6 +10,7 @@ import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Modality; import javafx.stage.Stage; +import javafx.stage.StageStyle; import res.Event; import res.DataController; @@ -41,13 +42,14 @@ public class MainController { protected void onAddBtnClick(){ try{ FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml")); - Scene scene = new Scene(fxmlLoader.load(), 700, 500); + Scene scene = new Scene(fxmlLoader.load(), 850, 500); scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm()); Stage stage = new Stage(); stage.setTitle("Termin erstellen"); stage.setScene(scene); stage.initModality(Modality.APPLICATION_MODAL); stage.setResizable(false); + stage.initStyle(StageStyle.UNDECORATED); stage.showAndWait(); } catch (IOException e){ @@ -71,4 +73,10 @@ public class MainController { Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); stage.close(); } + + @FXML + protected void abortBtnClick(ActionEvent event){ + Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); + stage.close(); + } } \ No newline at end of file diff --git a/hellofx/app/src/main/resources/client/create-event.css b/hellofx/app/src/main/resources/client/create-event.css index edc40ed..8fbf3f8 100644 --- a/hellofx/app/src/main/resources/client/create-event.css +++ b/hellofx/app/src/main/resources/client/create-event.css @@ -3,6 +3,12 @@ GridPane{ -fx-padding: 20px; -fx-font-size: 20px; -fx-font-family: Segoe UI; + + -fx-border-insets: 1; + -fx-border-color: white; + -fx-border-style: solid; + -fx-border-width: 2; + -fx-effect: dropshadow(three-pass-box, rgba(100, 100, 100, 1), 24, 0.5, 0, 0); } Label{ @@ -22,4 +28,8 @@ Label{ .inputField{ -fx-padding: 10px; +} + +.mainButton{ + -fx-font-weight: bold; } \ No newline at end of file diff --git a/hellofx/app/src/main/resources/client/create-event.fxml b/hellofx/app/src/main/resources/client/create-event.fxml index 116b1fe..6807b86 100644 --- a/hellofx/app/src/main/resources/client/create-event.fxml +++ b/hellofx/app/src/main/resources/client/create-event.fxml @@ -3,6 +3,7 @@ + @@ -10,6 +11,7 @@ + @@ -33,11 +35,12 @@ - + - + +