Skip to content

Commit 599c85a

Browse files
committed
Merge branch 'revert-0.4.1'
2 parents 791a5a3 + f1b7ebe commit 599c85a

File tree

5 files changed

+2
-65
lines changed

5 files changed

+2
-65
lines changed

bin/tests/ParserTest.class

12 Bytes
Binary file not shown.

src/ui/ScheduleBox.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/ui/ScheduleStage.java

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@
88
import comp110.Employee;
99
import comp110.Schedule;
1010
import comp110.Week;
11-
import javafx.collections.ObservableList;
12-
import javafx.geometry.Insets;
1311
import javafx.geometry.Pos;
14-
import javafx.scene.Node;
1512
import javafx.scene.Scene;
1613
import javafx.scene.control.Label;
1714
import javafx.scene.control.ScrollPane;
1815
import javafx.scene.control.Tab;
1916
import javafx.scene.control.TabPane;
2017
import javafx.scene.control.TabPane.TabClosingPolicy;
21-
import javafx.scene.layout.Border;
22-
import javafx.scene.layout.BorderStroke;
23-
import javafx.scene.layout.BorderStrokeStyle;
24-
import javafx.scene.layout.BorderWidths;
25-
import javafx.scene.layout.CornerRadii;
2618
import javafx.scene.layout.GridPane;
2719
import javafx.scene.paint.Color;
2820
import javafx.scene.text.Font;
@@ -146,45 +138,15 @@ public GridPane writeSchedule(Schedule schedule) {
146138
scheduledEmployee.setFill(Color.RED);
147139
}
148140
// +1 to account for day row
149-
TextFlow tf = new TextFlow (scheduledEmployee);
150-
// if (i == max - 1) {
151-
// tf.setBorder(new Border(new BorderStroke(Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK,
152-
// BorderStrokeStyle.NONE, BorderStrokeStyle.NONE, BorderStrokeStyle.SOLID, BorderStrokeStyle.NONE,
153-
// CornerRadii.EMPTY, BorderWidths.DEFAULT, Insets.EMPTY)));
154-
// }
155-
schedulePane.add(tf, day + 1, hourRow + i + 1);
141+
schedulePane.add(new TextFlow(scheduledEmployee), day + 1, hourRow + i + 1);
156142
}
157143
}
158144
}
159145
hourRow += max;
160146
}
161-
162-
//setup borders
163-
for (int day = 0; day < 7; day++) {
164-
for (int hour = getEarliestHour(schedule.getWeek()); hour < getLatestHour(schedule.getWeek()); hour++) {
165-
int max = getMaxSize(hour, schedule.getWeek());
166-
TextFlow tf= (TextFlow) this.getNodeByIndex(day, hour + max, schedulePane);
167-
}
168-
}
169-
170-
171147
return schedulePane;
172148
}
173149

174-
public Node getNodeByIndex (int row, int column, GridPane gridPane) {
175-
Node result = null;
176-
ObservableList<Node> childrens = gridPane.getChildren();
177-
178-
for (Node node : childrens) {
179-
if(GridPane.getRowIndex(node) == row && GridPane.getColumnIndex(node) == column) {
180-
result = node;
181-
break;
182-
}
183-
}
184-
185-
return result;
186-
}
187-
188150
// gets earliest scheduled hour in the week
189151
private static int getEarliestHour(Week week) {
190152
int min = 10000;

src/ui/UI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class UI extends Application {
3535
private ScheduleStage _scheduleStage;
3636
private ViewSwapsStage _viewSwapsStage;
3737

38-
private static final String VERSION = "0.4.1";
38+
private static final String VERSION = "0.4.2";
3939

4040

4141
@Override

0 commit comments

Comments
 (0)