diff --git a/src/main/java/seedu/address/logic/Logic.java b/src/main/java/seedu/address/logic/Logic.java index 83f0994b3d6..cc77cbcd2e0 100644 --- a/src/main/java/seedu/address/logic/Logic.java +++ b/src/main/java/seedu/address/logic/Logic.java @@ -34,8 +34,11 @@ public interface Logic { /** Returns an unmodifiable view of the filtered list of persons */ ObservableList getFilteredPersonList(); + /** Returns an unmodifiable view of the full list of persons */ + ObservableList getFullPersonList(); + /** Returns an unmodifiable view of events */ - ObservableList getEventList(); + ObservableList getFilteredEventList(); /** * Returns the user prefs' address book file path. diff --git a/src/main/java/seedu/address/logic/LogicManager.java b/src/main/java/seedu/address/logic/LogicManager.java index 06c62f19293..c190b726121 100644 --- a/src/main/java/seedu/address/logic/LogicManager.java +++ b/src/main/java/seedu/address/logic/LogicManager.java @@ -72,7 +72,12 @@ public ObservableList getFilteredPersonList() { } @Override - public ObservableList getEventList() { + public ObservableList getFullPersonList() { + return model.getFullPersonList(); + } + + @Override + public ObservableList getFilteredEventList() { return model.getFilteredEventList(); } diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index eec737a8206..355c420e299 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -2,7 +2,6 @@ import java.util.logging.Logger; -import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.MenuItem; @@ -17,7 +16,6 @@ import seedu.address.logic.commands.CommandResult; import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.Person; /** * The Main Window. Provides the basic application layout containing @@ -117,11 +115,10 @@ private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) { */ void fillInnerParts() { - ObservableList personList = logic.getFilteredPersonList(); - personListPanel = new PersonListPanel(personList); + personListPanel = new PersonListPanel(logic.getFilteredPersonList()); personListPanelPlaceholder.getChildren().add(personListPanel.getRoot()); - eventListPanel = new EventListPanel(logic.getEventList(), personList); + eventListPanel = new EventListPanel(logic.getFilteredEventList(), logic.getFullPersonList()); eventListPanelPlaceholder.getChildren().add(eventListPanel.getRoot()); resultDisplay = new ResultDisplay();