From c57e65fadba378914924b53c56da14bbe28a5a47 Mon Sep 17 00:00:00 2001 From: Johannes Kantz <67144859+JohannesKantz@users.noreply.github.com> Date: Tue, 31 Jan 2023 07:18:37 +0100 Subject: [PATCH] fix: refactor --- .../ParentMenuController.java | 10 +- .../WorkerMenuController.java | 5 +- .../adminMenue-view.fxml | 124 ------------------ .../adminMenue.css | 12 -- .../hello-view.fxml | 30 ----- .../{parentMenu.fxml => parentMenu-view.fxml} | 73 ++++++----- .../parentMenue-view.fxml | 82 ------------ .../parentMenue.css | 26 ---- .../{workerMenu.fxml => workerMenu-view.fxml} | 86 +++++++----- 9 files changed, 99 insertions(+), 349 deletions(-) delete mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml delete mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue.css delete mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/hello-view.fxml rename src/main/resources/com/bib/essensbestellungsverwaltung/{parentMenu.fxml => parentMenu-view.fxml} (52%) delete mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml delete mode 100644 src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue.css rename src/main/resources/com/bib/essensbestellungsverwaltung/{workerMenu.fxml => workerMenu-view.fxml} (56%) diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/ParentMenuController.java b/src/main/java/com/bib/essensbestellungsverwaltung/ParentMenuController.java index a50d7ae..87c5f37 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/ParentMenuController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/ParentMenuController.java @@ -3,16 +3,11 @@ package com.bib.essensbestellungsverwaltung; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; -import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.input.ContextMenuEvent; import javafx.scene.input.MouseEvent; -import javafx.scene.layout.Background; import javafx.scene.layout.BorderPane; -import javafx.stage.Stage; import java.io.IOException; -import java.util.Arrays; public class ParentMenuController { @@ -60,7 +55,7 @@ public class ParentMenuController { @FXML public void onAusloggenClick(MouseEvent mouseEvent) throws IOException { - Parent p = FXMLLoader.load(StartViewApplication.class.getResource("workerMenu.fxml")); + Parent p = FXMLLoader.load(StartViewApplication.class.getResource("workerMenu-view.fxml")); StartViewApplication.primary.getScene().setRoot(p); } @@ -72,7 +67,8 @@ public class ParentMenuController { throw new RuntimeException(e); } } - private void setButtonActive(Button b){ + + private void setButtonActive(Button b) { einstellungenButton.getStyleClass().remove("active"); kinderButton.getStyleClass().remove("active"); bestellungButton.getStyleClass().remove("active"); diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/WorkerMenuController.java b/src/main/java/com/bib/essensbestellungsverwaltung/WorkerMenuController.java index d552aea..1bc78ce 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/WorkerMenuController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/WorkerMenuController.java @@ -3,12 +3,9 @@ package com.bib.essensbestellungsverwaltung; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; -import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.input.ContextMenuEvent; import javafx.scene.input.MouseEvent; import javafx.scene.layout.BorderPane; -import javafx.stage.Stage; import java.io.IOException; @@ -72,7 +69,7 @@ public class WorkerMenuController { @FXML public void onAusloggenClick(MouseEvent mouseEvent) throws IOException { - Parent p = FXMLLoader.load(StartViewApplication.class.getResource("parentMenu.fxml")); + Parent p = FXMLLoader.load(StartViewApplication.class.getResource("parentMenu-view.fxml")); StartViewApplication.primary.getScene().setRoot(p); } diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml deleted file mode 100644 index 1577a9f..0000000 --- a/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue-view.fxml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + +
- +
diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml deleted file mode 100644 index 71aaf0c..0000000 --- a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - + + +
- +