-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replaced all the page controllers with one PageController
- Loading branch information
Showing
23 changed files
with
147 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
src/main/java/edu/group5/app/control/BrowseCardController.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/main/java/edu/group5/app/control/BrowsePageController.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/main/java/edu/group5/app/control/HeaderController.java
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/main/java/edu/group5/app/control/HomePageController.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/main/java/edu/group5/app/control/LoginPageController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
src/main/java/edu/group5/app/control/OrganizationPageController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| package edu.group5.app.control; | ||
|
|
||
| public class PageController { | ||
| private final MainController controller; | ||
|
|
||
| public PageController(MainController controller) { | ||
| this.controller = controller; | ||
| } | ||
|
|
||
| public void handleHomeBtn() { | ||
| System.out.println("Home button pressed"); | ||
| controller.showHomePage(); | ||
| } | ||
|
|
||
| public void handleCausesBtn() { | ||
| System.out.println("Causes button pressed"); | ||
| controller.showBrowsePage(); | ||
| } | ||
|
|
||
| public void handleAboutBtn() { | ||
| System.out.println("About button pressed"); | ||
| } | ||
|
|
||
| public void handleProfileBtn() { | ||
| System.out.println("profileSection"); | ||
| controller.showUserPage(); | ||
| } | ||
|
|
||
| public void handleDonateToACauseBtn() { | ||
| System.out.println("Donate to a cause button pressed"); | ||
| controller.showBrowsePage(); | ||
| } | ||
|
|
||
| public void handleRegisterBtn() { | ||
| System.out.println("Sign in button pressed"); | ||
| controller.showSignInPage(); | ||
| } | ||
|
|
||
| public void handleDonateClick() { | ||
| controller.showDonationPage(); | ||
| } | ||
|
|
||
|
|
||
| public void handleAboutUsBtn() { | ||
| System.out.println("About us button pressed"); | ||
| controller.showAboutUsPage(); | ||
| } | ||
|
|
||
| public void handleBrowseCardClick() { | ||
| controller.showDonationPage(); | ||
| } | ||
|
|
||
| public void handleSignInBtn() { | ||
| System.out.println("Sign in button pressed"); | ||
| controller.showHomePage(); | ||
| } | ||
| public void handleLoginBtn() { | ||
| System.out.println("Back to login button pressed"); | ||
| controller.showLoginPage(); | ||
| } | ||
|
|
||
| public void handleDonationBtn() { | ||
| System.out.println("Donating"); | ||
| controller.showPaymentCompletePage(); | ||
| } | ||
| } |
17 changes: 0 additions & 17 deletions
17
src/main/java/edu/group5/app/control/SignInPageController.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/main/java/edu/group5/app/control/donationpage/DonationPageController.java
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/main/java/edu/group5/app/control/donationpage/PaymentCompleteController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.