22
33import java .util .logging .Logger ;
44
5+ import javafx .fxml .FXML ;
56import javafx .scene .layout .Region ;
7+ import javafx .scene .layout .StackPane ;
68import seedu .address .commons .core .LogsCenter ;
79import seedu .address .logic .Logic ;
810
@@ -13,6 +15,29 @@ public class TimetablePanel extends UiPart<Region> {
1315
1416 private Logic logic ;
1517
18+ // Independent Ui parts residing in this Ui container
19+ private SlotListPanel mondayListPanel ;
20+ private SlotListPanel tuesdayListPanel ;
21+ private SlotListPanel wednesdayListPanel ;
22+ private SlotListPanel thursdayListPanel ;
23+ private SlotListPanel fridayListPanel ;
24+
25+ @ FXML
26+ private StackPane mondayListPanelPlaceholder ;
27+
28+ @ FXML
29+ private StackPane tuesdayListPanelPlaceholder ;
30+
31+ @ FXML
32+ private StackPane wednesdayListPanelPlaceholder ;
33+
34+ @ FXML
35+ private StackPane thursdayListPanelPlaceholder ;
36+
37+ @ FXML
38+ private StackPane fridayListPanelPlaceholder ;
39+
40+
1641 /** Constructs TimetablePanel
1742 *
1843 * @param logic
@@ -21,5 +46,20 @@ public TimetablePanel(Logic logic) {
2146 super (FXML );
2247
2348 this .logic = logic ;
49+
50+ mondayListPanel = new SlotListPanel (logic .getFilteredSlotList ("Monday" ));
51+ mondayListPanelPlaceholder .getChildren ().add (mondayListPanel .getRoot ());
52+
53+ tuesdayListPanel = new SlotListPanel (logic .getFilteredSlotList ("Tuesday" ));
54+ tuesdayListPanelPlaceholder .getChildren ().add (tuesdayListPanel .getRoot ());
55+
56+ wednesdayListPanel = new SlotListPanel (logic .getFilteredSlotList ("Wednesday" ));
57+ wednesdayListPanelPlaceholder .getChildren ().add (wednesdayListPanel .getRoot ());
58+
59+ thursdayListPanel = new SlotListPanel (logic .getFilteredSlotList ("Thursday" ));
60+ thursdayListPanelPlaceholder .getChildren ().add (thursdayListPanel .getRoot ());
61+
62+ fridayListPanel = new SlotListPanel (logic .getFilteredSlotList ("Friday" ));
63+ fridayListPanelPlaceholder .getChildren ().add (fridayListPanel .getRoot ());
2464 }
2565}
0 commit comments