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/adminMenue.css b/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue.css
deleted file mode 100644
index e924490..0000000
--- a/src/main/resources/com/bib/essensbestellungsverwaltung/adminMenue.css
+++ /dev/null
@@ -1,12 +0,0 @@
-#buttons:hover{
- -fx-underline: true;
- -fx-background-color: rgba(85, 103, 136, 0.64);
-}
-
-#optionsContainer{
- -fx-background-color: lightblue;
-}
-
-#optionsContainer{
- -fx-background-color: darkblue;
-}
\ No newline at end of file
diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/hello-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/hello-view.fxml
deleted file mode 100644
index 4e58774..0000000
--- a/src/main/resources/com/bib/essensbestellungsverwaltung/hello-view.fxml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu-view.fxml
similarity index 52%
rename from src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu.fxml
rename to src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu-view.fxml
index 96aff03..de33d09 100644
--- a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu.fxml
+++ b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenu-view.fxml
@@ -1,60 +1,70 @@
-
+
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue.css b/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue.css
deleted file mode 100644
index c43feb3..0000000
--- a/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue.css
+++ /dev/null
@@ -1,26 +0,0 @@
-#contentContainer{
- -fx-background-color: #add8e6;
-}
-
-#contentContainer2{
- -fx-background-color: lightblue;
-}
-
-#contentButton{
- -fx-background-color: transparent;
-}
-
-#contentButton:hover{
- -fx-underline: true;
- -fx-background-color: #78939d;
- -fx-text-fill: white;
-}
-
-#btLogOut{
- -fx-background-color: transparent;
- -fx-pref-height: 40px;
-}
-
-#btLogOut:hover{
- -fx-underline: true;
-}
\ No newline at end of file
diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu-view.fxml
similarity index 56%
rename from src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu.fxml
rename to src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu-view.fxml
index ea78ab2..34790cc 100644
--- a/src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu.fxml
+++ b/src/main/resources/com/bib/essensbestellungsverwaltung/workerMenu-view.fxml
@@ -1,111 +1,129 @@
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
+
+
+
-
+