diff --git a/src/seedu/addressbook/commands/Command.java b/src/seedu/addressbook/commands/Command.java index a54cbcb5b..c2dbf8aa4 100644 --- a/src/seedu/addressbook/commands/Command.java +++ b/src/seedu/addressbook/commands/Command.java @@ -36,6 +36,7 @@ public static String getMessageForPersonListShownSummary(List { +public class UniquePersonList implements Iterable, Printable { /** * Signals that an operation would have violated the 'no duplicates' property of the list. @@ -46,6 +46,17 @@ public UniquePersonList(Person... persons) throws DuplicatePersonException { internalList.addAll(initialTags); } + + @Override + public String getPrintableString (Printable... printables) { + String result = ""; + for (Printable prints: printables) { + result += prints.getPrintableString() + " "; + } + + return result; + } + /** * Constructs a list from the items in the given collection. * @param persons a collection of persons @@ -63,8 +74,14 @@ public UniquePersonList(Collection persons) throws DuplicatePersonExcept */ public UniquePersonList(UniquePersonList source) { internalList.addAll(source.internalList); + + for (Person person: internalList) { + System.out.println(getPrintableString(person.getName(), person.getPhone(), person.getEmail())); + } } + + /** * Unmodifiable java List view with elements cast as immutable {@link ReadOnlyPerson}s. * For use with other methods/libraries. diff --git a/src/seedu/addressbook/parser/Parser.java b/src/seedu/addressbook/parser/Parser.java index 58f4f7e6c..fc4e520a0 100644 --- a/src/seedu/addressbook/parser/Parser.java +++ b/src/seedu/addressbook/parser/Parser.java @@ -80,7 +80,6 @@ public Command parseCommand(String userInput) { case ExitCommand.COMMAND_WORD: return new ExitCommand(); - case HelpCommand.COMMAND_WORD: // Fallthrough default: return new HelpCommand(); diff --git a/src/seedu/addressbook/resources/chinchin.jpg b/src/seedu/addressbook/resources/chinchin.jpg new file mode 100644 index 000000000..5e2cc1365 Binary files /dev/null and b/src/seedu/addressbook/resources/chinchin.jpg differ diff --git a/src/seedu/addressbook/resources/chinchin@60.png b/src/seedu/addressbook/resources/chinchin@60.png new file mode 100644 index 000000000..f1b8962c8 Binary files /dev/null and b/src/seedu/addressbook/resources/chinchin@60.png differ diff --git a/src/seedu/addressbook/ui/DarkTheme.css b/src/seedu/addressbook/ui/DarkTheme.css index 9e6314894..b5d402ffd 100644 --- a/src/seedu/addressbook/ui/DarkTheme.css +++ b/src/seedu/addressbook/ui/DarkTheme.css @@ -14,4 +14,4 @@ -fx-font-family: "Segoe UI Semibold"; -fx-font-size: 10pt; -fx-padding: 5 5 5 5; -} +} \ No newline at end of file diff --git a/src/seedu/addressbook/ui/MainWindow.java b/src/seedu/addressbook/ui/MainWindow.java index 1fdde2a4f..88553a47b 100644 --- a/src/seedu/addressbook/ui/MainWindow.java +++ b/src/seedu/addressbook/ui/MainWindow.java @@ -5,6 +5,8 @@ import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; import seedu.addressbook.commands.ExitCommand; import seedu.addressbook.logic.Logic; import seedu.addressbook.commands.CommandResult; @@ -23,24 +25,12 @@ public class MainWindow { private Logic logic; private Stoppable mainApp; - public MainWindow(){ - } - - public void setLogic(Logic logic){ - this.logic = logic; - } - - public void setMainApp(Stoppable mainApp){ - this.mainApp = mainApp; - } - @FXML private TextArea outputConsole; @FXML private TextField commandInput; - @FXML void onCommand(ActionEvent event) { try { @@ -58,6 +48,30 @@ void onCommand(ActionEvent event) { } } + @FXML + private void initialize() { + commandInput.textProperty().addListener(new ChangeListener() { + @Override + public void changed(ObservableValue observable, + String oldValue, String newValue) { +// System.out.println(newValue); + } + }); + } + + public MainWindow(){ + } + + + public void setLogic(Logic logic){ + this.logic = logic; + } + + public void setMainApp(Stoppable mainApp){ + this.mainApp = mainApp; + } + + private void exitApp() throws Exception { mainApp.stop(); } diff --git a/src/seedu/addressbook/ui/mainwindow.fxml b/src/seedu/addressbook/ui/mainwindow.fxml index dafeaf6a7..dca985baa 100644 --- a/src/seedu/addressbook/ui/mainwindow.fxml +++ b/src/seedu/addressbook/ui/mainwindow.fxml @@ -4,10 +4,18 @@ + + + + + + + +