Compare commits
No commits in common. "646d63c6c0272f6bbd3c94ab26c05b2193b8e23e" and "54c3b9f3f5450bd1bb6b0f51f7ee0fba7438be97" have entirely different histories.
646d63c6c0
...
54c3b9f3f5
@ -7,8 +7,6 @@ import javafx.scene.Node;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MenueController {
|
||||
|
||||
@FXML
|
||||
@ -82,13 +80,19 @@ public class MenueController {
|
||||
|
||||
public ObservableList<Node> buttons = FXCollections.observableArrayList();
|
||||
|
||||
public void setButtonActive(){
|
||||
|
||||
public void setButtonActive(ActionEvent event) {
|
||||
Button b = (Button) event.getSource();
|
||||
}
|
||||
|
||||
public ObservableList<Node> getSiblings(Button b) {
|
||||
javafx.scene.Parent p = b.getParent();
|
||||
buttons = p.getChildrenUnmodifiable();
|
||||
return buttons;
|
||||
}
|
||||
|
||||
|
||||
public void setButtonActive(Button b) {
|
||||
getSiblings(b);
|
||||
for(Node button : buttons){
|
||||
b.getStyleClass().remove("active");
|
||||
System.out.println(b.getStyleClass());
|
||||
@ -98,4 +102,155 @@ public class MenueController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtSecondMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btSecondMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtNoMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btNoMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstDessertMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstDessertMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtSecondDessertMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btSecondDessertMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtNoDessertMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btNoDessertMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtSecondMealTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btSecondMealTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtNoMealTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btNoMealTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstDessertTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstDessertTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtSecondDessertTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btSecondDessertTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtNoDessertTueClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btNoDessertTue);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealWedClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealWed);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtSecondMealWedClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btSecondMealWed);
|
||||
}
|
||||
/*
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onBtFirstMealMonClick(MouseEvent mouseEvent) {
|
||||
setButtonActive(btFirstMealMon);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user