From 6d9e7c5929c45dd0ca0526a0ee450ddbebac6a8f Mon Sep 17 00:00:00 2001 From: Marc Beyer Date: Sun, 28 Nov 2021 08:13:18 +0100 Subject: [PATCH] Created controller for CreateEventView --- .../java/client/CreateEventController.java | 27 +++++++++++++++++++ .../main/resources/client/create-event.fxml | 3 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 hellofx/app/src/main/java/client/CreateEventController.java diff --git a/hellofx/app/src/main/java/client/CreateEventController.java b/hellofx/app/src/main/java/client/CreateEventController.java new file mode 100644 index 0000000..d78c55b --- /dev/null +++ b/hellofx/app/src/main/java/client/CreateEventController.java @@ -0,0 +1,27 @@ +package client; + +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.Node; +import javafx.stage.Stage; + +public class CreateEventController { + + public CreateEventController(){} + + @FXML + public void initialize(){} + + + @FXML + protected void createBtnClick(ActionEvent event){ + 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(); + } +} diff --git a/hellofx/app/src/main/resources/client/create-event.fxml b/hellofx/app/src/main/resources/client/create-event.fxml index 91ea65a..34e83fc 100644 --- a/hellofx/app/src/main/resources/client/create-event.fxml +++ b/hellofx/app/src/main/resources/client/create-event.fxml @@ -3,8 +3,7 @@ - - +