Skip to content

Commit e8371cf

Browse files
committed
fixed font loading bugs and new release
1 parent 9be9909 commit e8371cf

File tree

7 files changed

+5
-14
lines changed

7 files changed

+5
-14
lines changed

bin/comp110/Schedule.class

-696 Bytes
Binary file not shown.

bin/tests/ParserTest.class

-12 Bytes
Binary file not shown.

releases/ShiftOverflow_v0.3.1.jar

2.87 MB
Binary file not shown.

src/comp110/Schedule.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,8 @@ private void computeShiftLeads() {
4646
for (int hour = 0; hour < m_week.getShifts()[day].length; hour++) {
4747
Employee lead = null;
4848
int leadRank = Integer.MAX_VALUE; //we want to find min
49-
System.out.println("Day: " + day + " Hour: " + hour);
5049
for (Employee e : m_week.getShift(day, hour)) {
5150
int rank = m_leads.getRank(e);
52-
if (e.getOnyen().equals("youngjt")) {
53-
System.out.println("Jeffrey rank: " + rank);
54-
}
55-
if (e.getOnyen().equals("dunnac11")) {
56-
System.out.println("Duncan rank: " + rank);
57-
}
5851
if (rank < leadRank) { //if this employee is a potential lead
5952
// found a new min
6053
lead = e;
@@ -63,7 +56,6 @@ private void computeShiftLeads() {
6356
}
6457
if (lead != null) {
6558
m_week.getShift(day, hour).setLead(lead);
66-
System.out.println("Lead: " + lead.getOnyen());
6759
}
6860
}
6961
}

src/ui/ScheduleStage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public GridPane writeSchedule(Schedule schedule) {
7474
}
7575

7676
//Load the fonts
77-
InputStream is = ScheduleStage.class.getResourceAsStream("segoeui.ttf");
77+
InputStream is = getClass().getResourceAsStream("segoeui.ttf");
7878
Font font = Font.loadFont(is, 12.0);
79-
InputStream is2 = ScheduleStage.class.getResourceAsStream("segoeuibold.ttf");
79+
InputStream is2 = getClass().getResourceAsStream("segoeuibold.ttf");
8080
Font boldFont = Font.loadFont(is2, 12.0);
8181

8282

@@ -98,7 +98,7 @@ public GridPane writeSchedule(Schedule schedule) {
9898
scheduledEmployee.setFont(font);
9999

100100
//bold shift lead
101-
if (_ui.getCurrentEmployee() != null && schedule.getWeek().getShift(day, hour).getLead() != null && shifts.get(day).get(hour).get(i).equals(schedule.getWeek().getShift(day, hour).getLead())) {
101+
if (schedule.getWeek().getShift(day, hour).getLead() != null && shifts.get(day).get(hour).get(i).equals(schedule.getWeek().getShift(day, hour).getLead())) {
102102
scheduledEmployee.setFont(boldFont);
103103
//scheduledEmployee.setFont(Font.getDefault());
104104
}

src/ui/SwapBox.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ public SwapBox(UI ui) {
7171
public void registerSwapListener(Button saveButton, SwapBox otherBox) {
7272
_personListView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
7373
_swapEmployee = _ui.getSchedule().getStaff().getEmployeeByName(newValue.getText());
74-
System.out.println(_swapEmployee);
75-
System.out.println(otherBox.getSwapEmployee());
74+
7675
if (_swapEmployee != null && otherBox.getSwapEmployee() != null) {
7776
saveButton.setDisable(false);
7877
}

src/ui/UI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void displayAvailable(Employee employee) {
119119
if (_availabilityStage != null){
120120
_availabilityStage.close();
121121
}
122-
_availabilityStage = new AvailabilityStage("ShiftOverflow v0.3.0", _controller, this);
122+
_availabilityStage = new AvailabilityStage("ShiftOverflow v0.3.1", _controller, this);
123123
_availabilityStage.show();
124124
}
125125

0 commit comments

Comments
 (0)