MenueController Button highlight
This commit is contained in:
parent
72c2e9da16
commit
6e60fb1517
@ -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<String> cbPickChild;
|
||||
@FXML
|
||||
Button btLogin;
|
||||
@FXML
|
||||
Button btSaveOrder;
|
||||
@FXML
|
||||
ListView<String> lvFoodInfo;
|
||||
|
||||
private void setButtonActive(){
|
||||
public ObservableList<Node> 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");;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user