From d6fa04cf5ae73a557de0acf8bdd9fb7651c884cf Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Fri, 22 Sep 2017 08:16:49 +0800 Subject: [PATCH 1/6] added NFR, isMutating() --- doc/DeveloperGuide.md | 2 +- src/seedu/addressbook/commands/AddCommand.java | 3 +++ src/seedu/addressbook/commands/ClearCommand.java | 4 ++++ src/seedu/addressbook/commands/Command.java | 4 ++++ src/seedu/addressbook/commands/DeleteCommand.java | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/DeveloperGuide.md b/doc/DeveloperGuide.md index c82c3afb9..0db91800d 100644 --- a/doc/DeveloperGuide.md +++ b/doc/DeveloperGuide.md @@ -80,7 +80,7 @@ Use case ends. 2. Should be able to hold up to 1000 persons. 3. Should come with automated unit tests and open source code. 4. Should favor DOS style commands over Unix-style commands. - +5. Response should be within 2 seconds ## Appendix D : Glossary ##### Mainstream OS diff --git a/src/seedu/addressbook/commands/AddCommand.java b/src/seedu/addressbook/commands/AddCommand.java index b0f202d42..aee69702b 100644 --- a/src/seedu/addressbook/commands/AddCommand.java +++ b/src/seedu/addressbook/commands/AddCommand.java @@ -67,4 +67,7 @@ public CommandResult execute() { } } + public boolean isMutating() { + return true; + } } diff --git a/src/seedu/addressbook/commands/ClearCommand.java b/src/seedu/addressbook/commands/ClearCommand.java index 330146aaa..1cb858763 100644 --- a/src/seedu/addressbook/commands/ClearCommand.java +++ b/src/seedu/addressbook/commands/ClearCommand.java @@ -16,4 +16,8 @@ public CommandResult execute() { addressBook.clear(); return new CommandResult(MESSAGE_SUCCESS); } + + public boolean isMutating() { + return true; + } } diff --git a/src/seedu/addressbook/commands/Command.java b/src/seedu/addressbook/commands/Command.java index ccd4fcbf4..8a1a30b66 100644 --- a/src/seedu/addressbook/commands/Command.java +++ b/src/seedu/addressbook/commands/Command.java @@ -65,4 +65,8 @@ public int getTargetIndex() { public void setTargetIndex(int targetIndex) { this.targetIndex = targetIndex; } + + public boolean isMutating() { + return false; + } } diff --git a/src/seedu/addressbook/commands/DeleteCommand.java b/src/seedu/addressbook/commands/DeleteCommand.java index 1dd78f85e..9ed99d260 100644 --- a/src/seedu/addressbook/commands/DeleteCommand.java +++ b/src/seedu/addressbook/commands/DeleteCommand.java @@ -39,4 +39,8 @@ public CommandResult execute() { } } + public boolean isMutating() { + return true; + } + } From 3ca39eb82657e65e333bfb1e97e8f2591c4d066b Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Fri, 22 Sep 2017 08:29:46 +0800 Subject: [PATCH 2/6] added printable interface --- src/seedu/addressbook/data/person/Address.java | 6 +++++- src/seedu/addressbook/data/person/Printable.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/seedu/addressbook/data/person/Printable.java diff --git a/src/seedu/addressbook/data/person/Address.java b/src/seedu/addressbook/data/person/Address.java index 8ac726444..cac8ea798 100644 --- a/src/seedu/addressbook/data/person/Address.java +++ b/src/seedu/addressbook/data/person/Address.java @@ -6,7 +6,7 @@ * Represents a Person's address in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)} */ -public class Address { +public class Address implements Printable { public static final String EXAMPLE = "123, some street"; public static final String MESSAGE_ADDRESS_CONSTRAINTS = "Person addresses can be in any format"; @@ -55,4 +55,8 @@ public int hashCode() { public boolean isPrivate() { return isPrivate; } + + public String getPrintableString(Printable p, Printable p1, Printable p2) { + return value; + } } \ No newline at end of file diff --git a/src/seedu/addressbook/data/person/Printable.java b/src/seedu/addressbook/data/person/Printable.java new file mode 100644 index 000000000..4f2aa441b --- /dev/null +++ b/src/seedu/addressbook/data/person/Printable.java @@ -0,0 +1,5 @@ +package seedu.addressbook.data.person; + +public interface Printable { + String getPrintableString(Printable p, Printable p1, Printable p2); +} From 90efdb9c4cbaae3004f42915d0add4bbc66f8cf6 Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Fri, 22 Sep 2017 08:30:11 +0800 Subject: [PATCH 3/6] made font changes in gui --- src/seedu/addressbook/ui/Gui.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/seedu/addressbook/ui/Gui.java b/src/seedu/addressbook/ui/Gui.java index ed21989a4..6be44fa0c 100644 --- a/src/seedu/addressbook/ui/Gui.java +++ b/src/seedu/addressbook/ui/Gui.java @@ -6,6 +6,8 @@ import seedu.addressbook.logic.Logic; import seedu.addressbook.Main; +import javafx.scene.text.Font; +import javafx.scene.text.Text; import java.io.File; import java.io.IOException; @@ -42,6 +44,12 @@ private MainWindow createMainWindow(Stage stage, Stoppable mainApp) throws IOExc */ loader.setLocation(Main.class.getResource("ui/mainwindow.fxml")); + //set font + Text text = new Text(); + text.setText("Test"); + text.setFont(Font.font("Arial",16)); + + stage.setTitle(version); stage.setScene(new Scene(loader.load(), INITIAL_WINDOW_WIDTH, INITIAL_WINDOW_HEIGHT)); stage.show(); From 0cfcb9ed53b88f231d878165d843f8a72db44046 Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Sun, 24 Sep 2017 16:11:36 +0800 Subject: [PATCH 4/6] Revert "made font changes in gui" This reverts commit 90efdb9c4cbaae3004f42915d0add4bbc66f8cf6. --- src/seedu/addressbook/ui/Gui.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/seedu/addressbook/ui/Gui.java b/src/seedu/addressbook/ui/Gui.java index 6be44fa0c..ed21989a4 100644 --- a/src/seedu/addressbook/ui/Gui.java +++ b/src/seedu/addressbook/ui/Gui.java @@ -6,8 +6,6 @@ import seedu.addressbook.logic.Logic; import seedu.addressbook.Main; -import javafx.scene.text.Font; -import javafx.scene.text.Text; import java.io.File; import java.io.IOException; @@ -44,12 +42,6 @@ private MainWindow createMainWindow(Stage stage, Stoppable mainApp) throws IOExc */ loader.setLocation(Main.class.getResource("ui/mainwindow.fxml")); - //set font - Text text = new Text(); - text.setText("Test"); - text.setFont(Font.font("Arial",16)); - - stage.setTitle(version); stage.setScene(new Scene(loader.load(), INITIAL_WINDOW_WIDTH, INITIAL_WINDOW_HEIGHT)); stage.show(); From 950807d878df2a207ea96f9423081f2b1890d7e5 Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Sun, 24 Sep 2017 16:12:22 +0800 Subject: [PATCH 5/6] Revert "added printable interface" This reverts commit 3ca39eb82657e65e333bfb1e97e8f2591c4d066b. --- src/seedu/addressbook/data/person/Address.java | 6 +----- src/seedu/addressbook/data/person/Printable.java | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 src/seedu/addressbook/data/person/Printable.java diff --git a/src/seedu/addressbook/data/person/Address.java b/src/seedu/addressbook/data/person/Address.java index cac8ea798..8ac726444 100644 --- a/src/seedu/addressbook/data/person/Address.java +++ b/src/seedu/addressbook/data/person/Address.java @@ -6,7 +6,7 @@ * Represents a Person's address in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)} */ -public class Address implements Printable { +public class Address { public static final String EXAMPLE = "123, some street"; public static final String MESSAGE_ADDRESS_CONSTRAINTS = "Person addresses can be in any format"; @@ -55,8 +55,4 @@ public int hashCode() { public boolean isPrivate() { return isPrivate; } - - public String getPrintableString(Printable p, Printable p1, Printable p2) { - return value; - } } \ No newline at end of file diff --git a/src/seedu/addressbook/data/person/Printable.java b/src/seedu/addressbook/data/person/Printable.java deleted file mode 100644 index 4f2aa441b..000000000 --- a/src/seedu/addressbook/data/person/Printable.java +++ /dev/null @@ -1,5 +0,0 @@ -package seedu.addressbook.data.person; - -public interface Printable { - String getPrintableString(Printable p, Printable p1, Printable p2); -} From 423ee81096d0f157f20b1c0edcb014beb04635ed Mon Sep 17 00:00:00 2001 From: "APPLETEA\\Huijia" Date: Sun, 24 Sep 2017 16:12:34 +0800 Subject: [PATCH 6/6] Revert "added NFR, isMutating()" This reverts commit d6fa04cf5ae73a557de0acf8bdd9fb7651c884cf. --- doc/DeveloperGuide.md | 2 +- src/seedu/addressbook/commands/AddCommand.java | 3 --- src/seedu/addressbook/commands/ClearCommand.java | 4 ---- src/seedu/addressbook/commands/Command.java | 4 ---- src/seedu/addressbook/commands/DeleteCommand.java | 4 ---- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/doc/DeveloperGuide.md b/doc/DeveloperGuide.md index 0db91800d..c82c3afb9 100644 --- a/doc/DeveloperGuide.md +++ b/doc/DeveloperGuide.md @@ -80,7 +80,7 @@ Use case ends. 2. Should be able to hold up to 1000 persons. 3. Should come with automated unit tests and open source code. 4. Should favor DOS style commands over Unix-style commands. -5. Response should be within 2 seconds + ## Appendix D : Glossary ##### Mainstream OS diff --git a/src/seedu/addressbook/commands/AddCommand.java b/src/seedu/addressbook/commands/AddCommand.java index aee69702b..b0f202d42 100644 --- a/src/seedu/addressbook/commands/AddCommand.java +++ b/src/seedu/addressbook/commands/AddCommand.java @@ -67,7 +67,4 @@ public CommandResult execute() { } } - public boolean isMutating() { - return true; - } } diff --git a/src/seedu/addressbook/commands/ClearCommand.java b/src/seedu/addressbook/commands/ClearCommand.java index 1cb858763..330146aaa 100644 --- a/src/seedu/addressbook/commands/ClearCommand.java +++ b/src/seedu/addressbook/commands/ClearCommand.java @@ -16,8 +16,4 @@ public CommandResult execute() { addressBook.clear(); return new CommandResult(MESSAGE_SUCCESS); } - - public boolean isMutating() { - return true; - } } diff --git a/src/seedu/addressbook/commands/Command.java b/src/seedu/addressbook/commands/Command.java index 8a1a30b66..ccd4fcbf4 100644 --- a/src/seedu/addressbook/commands/Command.java +++ b/src/seedu/addressbook/commands/Command.java @@ -65,8 +65,4 @@ public int getTargetIndex() { public void setTargetIndex(int targetIndex) { this.targetIndex = targetIndex; } - - public boolean isMutating() { - return false; - } } diff --git a/src/seedu/addressbook/commands/DeleteCommand.java b/src/seedu/addressbook/commands/DeleteCommand.java index 9ed99d260..1dd78f85e 100644 --- a/src/seedu/addressbook/commands/DeleteCommand.java +++ b/src/seedu/addressbook/commands/DeleteCommand.java @@ -39,8 +39,4 @@ public CommandResult execute() { } } - public boolean isMutating() { - return true; - } - }