Compare commits
No commits in common. "02b578a7ce88959e29405e5f9adf7481d1aaf97b" and "87fa0f9b692872d760a186b97a102c4954a8d10b" have entirely different histories.
02b578a7ce
...
87fa0f9b69
@ -6,10 +6,6 @@ import javafx.fxml.FXML;
|
|||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class MenueController {
|
public class MenueController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
@ -75,26 +71,14 @@ public class MenueController {
|
|||||||
@FXML
|
@FXML
|
||||||
ComboBox<String> cbPickChild;
|
ComboBox<String> cbPickChild;
|
||||||
@FXML
|
@FXML
|
||||||
|
Button btLogin;
|
||||||
|
@FXML
|
||||||
Button btSaveOrder;
|
Button btSaveOrder;
|
||||||
@FXML
|
@FXML
|
||||||
ListView<String> lvFoodInfo;
|
ListView<String> lvFoodInfo;
|
||||||
|
|
||||||
public ObservableList<Node> buttons = FXCollections.observableArrayList();
|
public ObservableList<Node> buttons = FXCollections.observableArrayList();
|
||||||
public ObservableList<String> children = FXCollections.observableArrayList();
|
|
||||||
|
|
||||||
public List<Child> allChildren = AccountMgr.getAllChildrenFromParentWithId(3);
|
|
||||||
public void initialize(){
|
|
||||||
FoodPlan foodplanMon = FoodMgr.getFoodPlanById(1);
|
|
||||||
FoodPlan foodplanTue = FoodMgr.getFoodPlanById(2);
|
|
||||||
FoodPlan foodplanWed = FoodMgr.getFoodPlanById(3);
|
|
||||||
FoodPlan foodplanThu = FoodMgr.getFoodPlanById(4);
|
|
||||||
FoodPlan foodplanFri = FoodMgr.getFoodPlanById(5);
|
|
||||||
|
|
||||||
for (Child c : allChildren){
|
|
||||||
children.add(c.getFirstname());
|
|
||||||
}
|
|
||||||
cbPickChild.setItems(children);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setButtonActive(ActionEvent event) {
|
public void setButtonActive(ActionEvent event) {
|
||||||
Button b = (Button) event.getSource();
|
Button b = (Button) event.getSource();
|
||||||
@ -103,7 +87,14 @@ public class MenueController {
|
|||||||
buttons = p.getChildrenUnmodifiable();
|
buttons = p.getChildrenUnmodifiable();
|
||||||
|
|
||||||
for(Node button : buttons){
|
for(Node button : buttons){
|
||||||
button.setDisable(button.equals(b));
|
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