Skip to content
This repository was archived by the owner on Dec 4, 2020. It is now read-only.

Commit 4d5c581

Browse files
committed
2 parents e41e8b2 + 1d61617 commit 4d5c581

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

tracker/.classpath

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@
1414
</classpathentry>
1515
<classpathentry kind="src" output="bin/test" path="src/test/java">
1616
<attributes>
17-
<attribute name="test" value="true"/>
1817
<attribute name="gradle_scope" value="test"/>
1918
<attribute name="gradle_used_by_scope" value="test"/>
19+
<attribute name="test" value="true"/>
2020
</attributes>
2121
</classpathentry>
2222
<classpathentry kind="src" output="bin/test" path="src/test/resources">
2323
<attributes>
24-
<attribute name="test" value="true"/>
2524
<attribute name="gradle_scope" value="test"/>
2625
<attribute name="gradle_used_by_scope" value="test"/>
26+
<attribute name="test" value="true"/>
2727
</attributes>
2828
</classpathentry>
2929
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
3030
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
31-
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
3231
<classpathentry kind="output" path="bin/default"/>
3332
</classpath>

tracker/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ mainClassName = 'com.hanahs.tracker.Main'
1818

1919
repositories {
2020
jcenter()
21+
maven { url 'https://jitpack.io' }
2122
}
2223

2324
dependencies {
@@ -28,7 +29,7 @@ dependencies {
2829
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
2930
implementation 'com.google.apis:google-api-services-classroom:v1-rev135-1.23.0'
3031
implementation 'org.openkoreantext:open-korean-text:2.3.1'
31-
implementation 'com.github.scribejava:scribejava-core:8.0.0'
32+
implementation 'com.github.rvanasa:schoology-api:master-SNAPSHOT'
3233
}
3334

3435
test {

tracker/src/main/java/com/hanahs/tracker/MainScreenController.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
import javafx.scene.control.Alert.AlertType;
2424
import javafx.scene.control.Label;
2525
import javafx.scene.control.Spinner;
26+
import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory;
2627

2728
public class MainScreenController {
2829
@FXML private GridPane calendarGrid;
2930
@FXML private ListView<AssignmentProvider> accountList;
3031
@FXML private Label scheduleDescriptionLabel;
3132
@FXML private ListView scheduleList;
32-
@FXML Spinner scheduleDays;
33+
@FXML Spinner<Integer> scheduleDays;
3334
private int currentSelectionY = -1;
3435
private int currentSelectionX = -1;
3536
private AssignmentManager manager;
@@ -58,6 +59,7 @@ private Node getNodeFromGridPane(int col, int row) {
5859
label.setPrefWidth(Double.MAX_VALUE);
5960
label.getStyleClass().add("calendar-date");
6061
label.setId(String.format("label_%d_%d", x, y + 1));
62+
label.getProperties().put("date", current);
6163
EventHandler<MouseEvent> handler = new EventHandler<MouseEvent>() {
6264
@Override
6365
public void handle(MouseEvent event) {
@@ -92,8 +94,13 @@ public void handle(MouseEvent event) {
9294
current = current.plusDays(1);
9395
}
9496
}
97+
9598
accountList.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
9699
scheduleList.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
100+
101+
IntegerSpinnerValueFactory factory = new IntegerSpinnerValueFactory(1, 30, 7);
102+
scheduleDays.setValueFactory(factory);
103+
97104
manager = new AssignmentManager();
98105
}
99106

@@ -146,7 +153,7 @@ private void updateAccountList() {
146153
} catch(IOException e) {
147154
e.printStackTrace();
148155
String titleText = "오류 발생";
149-
String contentText = "스케쥴을 불러오는 과정에서 오류가 발생했습니다.";
156+
String contentText = "스케줄을 생성하는 과정에서 오류가 발생했습니다.";
150157
showErrorAlert(titleText, contentText);
151158
}
152159
}

0 commit comments

Comments
 (0)