diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java index aaa7f7a..6ce335c 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java @@ -1,24 +1,100 @@ -/** - * Author: Reshad Meher - * Startseite - * fxml: menue-view.fxml - */ - package com.bib.essensbestellungsverwaltung; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; import javafx.event.ActionEvent; 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 + 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; - private void setButtonActive(){ + public ObservableList buttons = FXCollections.observableArrayList(); + + public void setButtonActive(ActionEvent event) { + Button b = (Button) event.getSource(); + + javafx.scene.Parent p = b.getParent(); + buttons = p.getChildrenUnmodifiable(); + + for(Node button : buttons){ + System.out.println(b.getStyleClass()); + /* + b.getStyleClass().remove("active"); + + if (button.equals(b)){ + b.getStyleClass().add("active");; + } + */ + } } }