diff --git a/client/app/src/main/java/main/MainController.java b/client/app/src/main/java/main/MainController.java index c7092a7..b2d8d80 100644 --- a/client/app/src/main/java/main/MainController.java +++ b/client/app/src/main/java/main/MainController.java @@ -150,6 +150,23 @@ public class MainController { }); Button editBtn = new Button(); editBtn.setText("edit"); + editBtn.setOnAction(event1 -> { + try { + FXMLLoader fxmlLoader = new FXMLLoader( + MainApplication.class.getResource("edit-event.fxml")); + Scene scene = new Scene(fxmlLoader.load(), 650, 650); + scene.getStylesheets().add(Objects.requireNonNull( + MainApplication.class.getResource("edit-event.css")).toExternalForm()); + Stage stage = new Stage(); + stage.setTitle("Termin bearbeiten"); + stage.setScene(scene); + stage.initModality(Modality.APPLICATION_MODAL); + stage.setResizable(false); + stage.showAndWait(); + } catch (IOException e) { + e.printStackTrace(); + } + }); btnHBox.getChildren().add(editBtn); btnHBox.getChildren().add(deleteBtn); vBox.getChildren().add(btnHBox); diff --git a/client/app/src/main/resources/main/edit-event.css b/client/app/src/main/resources/main/edit-event.css new file mode 100644 index 0000000..442c669 --- /dev/null +++ b/client/app/src/main/resources/main/edit-event.css @@ -0,0 +1,46 @@ +GridPane{ + -fx-background-color: #3E415F; + -fx-padding: 20px; + -fx-font-size: 20px; + -fx-font-family: Segoe UI; + + -fx-border-insets: 1; + -fx-border-color: #B0B0B0; + -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{ + -fx-text-fill: white; + -fx-max-width: 150px; + -fx-min-width: 150px; +} + +.mainLabel{ + -fx-background-color: #8D99AE; + -fx-padding: 10px; + -fx-max-width: 200px; + -fx-min-width: 200px; + -fx-font-weight: bold; + -fx-alignment: center; +} + +.inputField{ + -fx-padding: 10px; +} + +.mainButton{ + -fx-font-weight: bold; +} + +#labelError{ + -fx-font-weight: bold; + -fx-max-width: 1000px; + -fx-text-fill: #ff5555; + -fx-padding: 16px; + -fx-min-height: 140px; + -fx-max-height: 400px; + -fx-wrap-text: true; + -fx-font-size: 16px; +} \ No newline at end of file diff --git a/client/app/src/main/resources/main/edit-event.fxml b/client/app/src/main/resources/main/edit-event.fxml new file mode 100644 index 0000000..029d566 --- /dev/null +++ b/client/app/src/main/resources/main/edit-event.fxml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +