diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java index c52b33a..5214014 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java @@ -1,25 +1,99 @@ -/** - * Author: Reshad Meher - * Startseite - * fxml: menue-view.fxml - */ - package com.bib.essensbestellungsverwaltung; -import javafx.event.ActionEvent; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Alert; -import javafx.stage.Stage; - -import java.io.IOException; +import javafx.scene.Node; +import javafx.scene.control.*; public class MenueController { @FXML - private void onBtLoginClick(){ - Alert alert = new Alert(Alert.AlertType.ERROR, "Hi"); - alert.showAndWait(); + Button btFirstMealMon; + @FXML + Button btSecondMealMon; + @FXML + Button btNoMealMon; + @FXML + Button btFirstDessertMon; + @FXML + Button btSecondDessertMon; + @FXML + Button btNoDessertMon; + @FXML + Button btFirstMealTue; + @FXML + Button btSecondMealTue; + @FXML + Button btNoMealTue; + @FXML + Button btFirstDessertTue; + @FXML + Button btSecondDessertTue; + @FXML + Button btNoDessertTue; + @FXML + Button btFirstMealWed; + @FXML + Button btSecondMealWed; + @FXML + Button btNoMealWed; + @FXML + Button btFirstDessertWed; + @FXML + Button btSecondDessertWed; + @FXML + Button btNoDessertWed; + @FXML + Button btFirstMealThu; + @FXML + Button btSecondMealThu; + @FXML + Button btNoMealThu; + @FXML + Button btFirstDessertThu; + @FXML + Button btSecondDessertThu; + @FXML + Button btNoDessertThu; + @FXML + Button btFirstMealFri; + @FXML + Button btSecondMealFri; + @FXML + Button btNoMealFri; + @FXML + Button btFirstDessertFri; + @FXML + Button btSecondDessertFri; + @FXML + Button btNoDessertFri; + @FXML + ComboBox cbPickChild; + @FXML + Button btLogin; + @FXML + Button btSaveOrder; + @FXML + ListView lvFoodInfo; + + public ObservableList buttons = FXCollections.observableArrayList(); + + public void setButtonActive(Button b){ + getSiblings(b); + for(Node button : buttons){ + button.getStyleClass().remove("active"); + + if (button.equals(b)){ + b.getStyleClass().add("active");; + } + } } + + public ObservableList getSiblings(Button b) { + javafx.scene.Parent p = b.getParent(); + buttons = p.getChildrenUnmodifiable(); + return buttons; + } + + } diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/menue.css b/src/main/resources/com/bib/essensbestellungsverwaltung/menue.css index fc8e78f..0dcdd16 100644 --- a/src/main/resources/com/bib/essensbestellungsverwaltung/menue.css +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/menue.css @@ -1,40 +1,10 @@ -#btFoodChoice{ - -fx-background-color: transparent; +.sidebar-nav_button { + -fx-background-color: #69b6ff; + -fx-text-fill: #123; + -fx-border-color: #000; + -fx-border-radius: 20; +} +.sidebar-nav_button.active { + -fx-background-color: #4e92b4; } -#btFoodChoice:hover{ - -fx-underline: true; - -fx-text-fill: black; -} -#btPlaceOrder{ - -fx-background-color: lightblue; - -fx-text-fill: white; - -fx-background-radius: 25; -} - -#btLogin{ - -fx-background-color: #9ac1ce; - -fx-text-fill: white; -} - -#btLogin:hover{ - -fx-underline: true; - -fx-text-fill: black; -} - - -#btPlaceOrder:hover{ - -fx-border-width: 0; - -fx-text-fill: black; - -fx-underline: true; -} - -#cbChooseChild{ - -fx-background-color: #9ac1ce; - -fx-prompt-text-fill: white; -} - -#btFoodChoice:hover{ - -fx-underline: true; - -fx-text-fill: black; -} \ No newline at end of file