package com.example.schedulerapp; import javafx.geometry.HPos; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import java.util.ArrayList; public class DailyView extends ScheduleView{ public DailyView() {} public void draw(){ //clear contents.getChildren().clear(); //add to gridpane - time axis never changes int i = 1; for (Label time : times){ contents.add(time, 0, i); i++; } int col = 1; //start on the second column // update employee axis and schedule display ArrayList<Shift> schedule = model.getDailySchedule(); for (Shift shift : schedule){ Label name = new Label(Integer.toString(shift.getEmployeeID())); GridPane.setHalignment(name, HPos.CENTER); contents.add(name, col, 0); //todo: display name instead contents.add(this.formatShiftButton(shift), col, this.shiftGetRow(shift), 1, this.shiftGetLength(shift)); col++; } } }