Skip to content

Commit

Permalink
Merge pull request #84 from Ken-Lai/branch-find-command
Browse files Browse the repository at this point in the history
Fix bugs for EventListPanel
  • Loading branch information
Kurtyjlee authored Nov 2, 2023
2 parents 7d0a902 + dd809d9 commit 54c03eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/main/java/seedu/address/logic/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ public interface Logic {
/** Returns an unmodifiable view of the filtered list of persons */
ObservableList<Person> getFilteredPersonList();

/** Returns an unmodifiable view of the full list of persons */
ObservableList<Person> getFullPersonList();

/** Returns an unmodifiable view of events */
ObservableList<Event> getEventList();
ObservableList<Event> getFilteredEventList();

/**
* Returns the user prefs' address book file path.
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/seedu/address/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ public ObservableList<Person> getFilteredPersonList() {
}

@Override
public ObservableList<Event> getEventList() {
public ObservableList<Person> getFullPersonList() {
return model.getFullPersonList();
}

@Override
public ObservableList<Event> getFilteredEventList() {
return model.getFilteredEventList();
}

Expand Down
7 changes: 2 additions & 5 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -117,11 +115,10 @@ private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
*/
void fillInnerParts() {

ObservableList<Person> 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();
Expand Down

0 comments on commit 54c03eb

Please sign in to comment.