From 3bb141fb5283e601a4eea9b870dd78d2cb2c5918 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 17 Jan 2023 15:58:22 +0100 Subject: [PATCH 1/6] Views & Controller erstellt --- .../AdminController.java | 4 + .../LaunchController.java | 4 + .../LoginController.java | 38 +++++++ .../ParentController.java | 4 + .../SceneController.java | 24 ++++ .../StartPageController.java | 4 + .../adminMenue-view.fxml | 14 +++ .../changePrice-view.fxml | 14 +++ .../createChild-view.fxml | 14 +++ .../createCoworker-view.fxml | 14 +++ .../createFood-view.fxml | 14 +++ .../createFoodplan-view.fxml | 14 +++ .../dailyOrder-view.fxml | 14 +++ .../invoice-view.fxml | 14 +++ .../login-view.fxml | 4 +- .../parentMenue-view.fxml | 14 +++ .../signUp-view.fxml | 107 ++++++++++++++++++ 17 files changed, 313 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/AdminController.java create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/LaunchController.java create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/LoginController.java create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/SceneController.java create mode 100644 src/main/java/com/bib/essensbestellungsverwaltung/StartPageController.java create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/changePrice-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/createChild-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/createCoworker-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/createFood-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/createFoodplan-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/dailyOrder-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/invoice-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml create mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/AdminController.java b/src/main/java/com/bib/essensbestellungsverwaltung/AdminController.java new file mode 100644 index 0000000..6494355 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/AdminController.java @@ -0,0 +1,4 @@ +package com.bib.essensbestellungsverwaltung; + +public class AdminController { +} diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/LaunchController.java b/src/main/java/com/bib/essensbestellungsverwaltung/LaunchController.java new file mode 100644 index 0000000..9e9a8a5 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/LaunchController.java @@ -0,0 +1,4 @@ +package com.bib.essensbestellungsverwaltung; + +public class LaunchController { +} diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/LoginController.java b/src/main/java/com/bib/essensbestellungsverwaltung/LoginController.java new file mode 100644 index 0000000..2cc1492 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/LoginController.java @@ -0,0 +1,38 @@ +/*Richard Reiswich*/ +package com.bib.essensbestellungsverwaltung; + +import javafx.beans.NamedArg; +import javafx.fxml.FXML; +import javafx.scene.control.Button; +import javafx.scene.control.PasswordField; +import javafx.scene.control.TextField; +public class LoginController { + @FXML + private TextField tfEmail; + + @FXML + private PasswordField pfPassword; + + @FXML + private Button btLogin; + + @FXML + private Button btSignUp; + + + + @FXML + protected void onBtLoginClick(){ + String email = tfEmail.getText(); + String password = pfPassword.getText(); + + + + tfEmail.setText(""); + pfPassword.setText(""); + } + @FXML + protected void changeToSignUp(){ + + } +} diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java b/src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java new file mode 100644 index 0000000..e862560 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java @@ -0,0 +1,4 @@ +package com.bib.essensbestellungsverwaltung; + +public class ParentController{ + } diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/SceneController.java b/src/main/java/com/bib/essensbestellungsverwaltung/SceneController.java new file mode 100644 index 0000000..5bd1bf5 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/SceneController.java @@ -0,0 +1,24 @@ +package com.bib.essensbestellungsverwaltung; + +import javafx.event.ActionEvent; +import javafx.fxml.FXMLLoader; +import javafx.scene.Node; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +import java.io.IOException; + +public class SceneController { + private Stage stage; + private Scene scene; + private Parent root; + + public void switchToLoginScene(ActionEvent event) throws IOException{ + Parent root = FXMLLoader.load(getClass().getResource("login-view.fxml")); + stage = (Stage) ((Node)event.getSource()).getScene().getWindow(); + scene = new Scene(root); + stage.setScene(scene); + stage.show(); + } +} diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/StartPageController.java b/src/main/java/com/bib/essensbestellungsverwaltung/StartPageController.java new file mode 100644 index 0000000..de9f111 --- /dev/null +++ b/src/main/java/com/bib/essensbestellungsverwaltung/StartPageController.java @@ -0,0 +1,4 @@ +package com.bib.essensbestellungsverwaltung; + +public class StartPageController { +} diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/changePrice-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/changePrice-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/changePrice-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/createChild-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/createChild-view.fxml new file mode 100644 index 0000000..9380062 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/createChild-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/createCoworker-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/createCoworker-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/createCoworker-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/createFood-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/createFood-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/createFood-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/createFoodplan-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/createFoodplan-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/createFoodplan-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/dailyOrder-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/dailyOrder-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/dailyOrder-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/invoice-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/invoice-view.fxml new file mode 100644 index 0000000..1087a44 --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/invoice-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/login-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/login-view.fxml index 0fb333e..e19ed9d 100644 --- a/src/main/resources/com/bib/essensbestellungsverwaltung/login-view.fxml +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/login-view.fxml @@ -12,11 +12,11 @@ - + - + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml new file mode 100644 index 0000000..cf191be --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml new file mode 100644 index 0000000..6ef501b --- /dev/null +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +