Skip to content

Commit

Permalink
Added Ui.png
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiHawkEye committed Sep 19, 2019
1 parent 850ae59 commit 5c8b7ab
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 40 deletions.
10 changes: 6 additions & 4 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
<classpathentry kind="lib" path="/Users/kaizhe/Desktop/Modules/CS2103/javafx-sdk-11.0.2/lib/javafx.base.jar"/>
<classpathentry kind="lib" path="/Users/kaizhe/Desktop/Modules/CS2103/javafx-sdk-11.0.2/lib/javafx.graphics.jar"/>
<classpathentry kind="lib" path="/Users/kaizhe/Desktop/Modules/CS2103/javafx-sdk-11.0.2/lib/javafx.controls.jar"/>
<classpathentry kind="lib" path="/Users/kaizhe/Desktop/Modules/CS2103/javafx-sdk-11.0.2/lib/javafx.fxml.jar"/>
</classpath>
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
65 changes: 41 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,62 @@ plugins {
id 'application'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'org.openjfx.javafxplugin' version '0.0.7'
}

shadowJar {
archiveBaseName = "duke"
archiveVersion = "0.1.3"
archiveClassifier = null
archiveAppendix = null
}

checkstyle {
toolVersion = '8.23'
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.0'
}

test {
useJUnitPlatform()
}

group 'seedu.duke'
version '0.1.0'

repositories {
mavenCentral()
}

javafx {
version = "11.0.2"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}

application {
// Change this to your main class.
mainClassName = "duke.Duke"
mainClassName = "duke.Launcher"
}

shadowJar {
archiveBaseName = "duke"
archiveVersion = "0.2"
archiveClassifier = null
archiveAppendix = null
}

run {
standardInput = System.in
//@@author zihawkeye-reused
//Reused from https://github.com/Oscar-B-Liang/duke/pull/6/files with no modifications.
dependencies {
String javaFxVersion = '11'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'linux'

testImplementation('org.junit.jupiter:junit-jupiter:5.5.1')
}
//@@author

test {
useJUnitPlatform()

testLogging {
events = ["passed", "failed", "skipped"]
}
}
Binary file added data/duke.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Example of usage:
Expected outcome:

`Here is the sorted list:`\
` 1.[E][✘] Kennedy's visit to Texas (at: Thu Oct 11 12:30:00 SGT 64)`\
` 1.[E][✘] Kennedy's visit to Texas (at: Tue Nov 22 12:30:00 SGT 63)`\
` 2.[D][✓] CS2100 assignment (by: Wed Sep 18 23:59:00 SGT 2019)`

## Exit program
Expand Down
Binary file added docs/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/java/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class MainWindow extends AnchorPane {

private Duke duke;

private Image userImage = new Image(this.getClass().getResourceAsStream("/resources/DaUser.png"));
private Image dukeImage = new Image(this.getClass().getResourceAsStream("/resources/DaDuke.png"));
private Image userImage = new Image(this.getClass().getResourceAsStream("/images/DaUser.png"));
private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/DaDuke.png"));

/**
* Initialization of the main program.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/command/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException
tempList.addTask(task);
}
}
ui.printResponse("Here are the matching tasks in your list:\n "
ui.printResponse("Here are the matching tasks in your list:\n"
+ tempList.toString() + "\n");
}

Expand Down
Binary file modified src/main/java/data/duke.txt
Binary file not shown.
16 changes: 8 additions & 8 deletions src/main/java/util/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public static DoneCommand parseDone(String input) throws DukeException {
assert (words.length == 2);
String command = words[0];
itemId = Integer.parseInt(words[1]);
} catch (AssertionError | NumberFormatException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for done command.");
} catch (AssertionError | NumberFormatException | IndexOutOfBoundsException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for done command. Format: `done [ITEMID]`.");
}

return new DoneCommand(itemId);
Expand All @@ -101,8 +101,8 @@ public static DeleteCommand parseDelete(String input) throws DukeException {
assert (words.length == 2);
String command = words[0];
itemId = Integer.parseInt(words[1]);
} catch (AssertionError | NumberFormatException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for delete command.");
} catch (AssertionError | NumberFormatException | IndexOutOfBoundsException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for delete command. Format: `delete [ITEMID]`.");
}

return new DeleteCommand(itemId);
Expand Down Expand Up @@ -153,7 +153,7 @@ public static AddCommand parseTask(String input) throws DukeException {
case "event":
args = info.split("/at");
if (args.length != 2) {
throw new DukeException("☹ OOPS!!! A event must include a description and date.");
throw new DukeException("☹ OOPS!!! An event must include a description and date.");
}

description = args[0].trim();
Expand All @@ -164,7 +164,7 @@ public static AddCommand parseTask(String input) throws DukeException {
try {
date = dateFormatter.parse(args[1].trim());
} catch (ParseException e) {
throw new DukeException("☹ OOPS!!! Incorrect date format.");
throw new DukeException("☹ OOPS!!! Incorrect date format. Format: `[MONTH]/[DAY]/[YEAR] [HOUR][MIN]`.");
}

return new AddCommand(new Event(description, date));
Expand All @@ -184,7 +184,7 @@ public static FindCommand parseFind(String input) throws DukeException {
try {
query = input.substring("find ".length()).trim();
} catch (IndexOutOfBoundsException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for find command.");
throw new DukeException("☹ OOPS!!! Incorrect format for find command. Format: `find [QUERY]`.");
}
return new FindCommand(query);
}
Expand All @@ -200,7 +200,7 @@ public static SortCommand parseSort(String input) throws DukeException {
try {
field = input.substring("sort".length()).trim();
} catch (IndexOutOfBoundsException e) {
throw new DukeException("☹ OOPS!!! Incorrect format for sort command.");
throw new DukeException("☹ OOPS!!! Incorrect format for sort command. Format: `sort [FIELD]`.");
}
return new SortCommand(field);
}
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit 5c8b7ab

Please sign in to comment.