Skip to content

Commit

Permalink
Add new constructor for WishDetailPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
bannified committed Oct 24, 2018
1 parent e11fde5 commit 26dd5a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/main/java/seedu/address/ui/WishDetailPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javafx.scene.layout.Region;
import seedu.address.commons.core.LogsCenter;
import seedu.address.commons.events.ui.WishPanelSelectionChangedEvent;
import seedu.address.model.WishTransaction;
import seedu.address.model.wish.Wish;

/**
Expand Down Expand Up @@ -51,6 +52,19 @@ public WishDetailPanel() {

loadDefaultPage();
registerAsAnEventHandler(this);

// TODO: [Jiho] Remove this constructor once the one immediately below this is used.
}

public WishDetailPanel(WishTransaction wishTransaction) {
super(FXML);

// To prevent triggering events for typing inside the loaded Web page.
getRoot().setOnKeyPressed(Event::consume);

loadDefaultPage();
registerAsAnEventHandler(this);
// TODO: [Jiho] Utilize wishTransaction's data in the WishDetailPanel (if wanted).
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/WishListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public WishListPanel(ObservableList<Wish> wishList, WishTransaction wishTransact
setConnections(wishList);
registerAsAnEventHandler(this);

// TODO: [Jiho] Utilize wishTransaction's data in the WishListPanel
// TODO: [Jiho] Utilize wishTransaction's data in the WishListPanel (if wanted).
}

private void setConnections(ObservableList<Wish> wishList) {
Expand Down

0 comments on commit 26dd5a6

Please sign in to comment.