-
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.
feat: added showBrowsePage functionality to MainView and altered it t…
…o work with the new Controller structure
- Loading branch information
Showing
6 changed files
with
33 additions
and
11 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,38 @@ | ||
| package edu.group5.app.view; | ||
|
|
||
| import edu.group5.app.control.BrowseCardController; | ||
| import edu.group5.app.control.BrowsePageController; | ||
| import edu.group5.app.control.HeaderController; | ||
| import edu.group5.app.control.HomePageController; | ||
| import edu.group5.app.control.MainController; | ||
| import edu.group5.app.view.browsepage.BrowsePageView; | ||
| import edu.group5.app.view.homepage.HomePageView; | ||
| import javafx.scene.Scene; | ||
| import javafx.scene.layout.BorderPane; | ||
|
|
||
| public class MainView { | ||
| private final HeaderController headerController; | ||
| private final HomePageController homePageController; | ||
| private final Scene scene; | ||
| private final BorderPane root; | ||
|
|
||
| public MainView(MainController mainController) { | ||
| this.headerController = new HeaderController(mainController); | ||
| this.homePageController = new HomePageController(mainController); | ||
| public MainView() { | ||
| this.root = new BorderPane(); | ||
| this.scene = new Scene(root, 1280, 720); | ||
| } | ||
|
|
||
| public Scene createView() { | ||
| root.setCenter(new HomePageView(homePageController, headerController)); | ||
| return new Scene(root, 1280, 720); | ||
| public Scene getScene() { | ||
| return this.scene; | ||
| } | ||
|
|
||
| public void showHomePage() { | ||
| public void showHomePage(HomePageController homePageController, HeaderController headerController) { | ||
| root.setCenter(new HomePageView(homePageController, headerController)); | ||
| } | ||
|
|
||
| public void showLoginPage() { | ||
|
|
||
| } | ||
|
|
||
| public void showBrowsePage() {} | ||
| public void showBrowsePage(BrowsePageController browsePageController, BrowseCardController browseCardController, HeaderController headerController) { | ||
| root.setCenter(new BrowsePageView(getScene(), browsePageController, browseCardController, headerController)); | ||
| } | ||
|
|
||
| public void showAboutUsPage() {} | ||
| } |
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,18 @@ | ||
| #mainContainer { | ||
| -fx-border-color: black; | ||
| -fx-border-width: 1px; | ||
| -fx-border-radius: 1em; | ||
| -fx-padding: 5px; | ||
| -fx-pref-width: 10px; | ||
| } | ||
|
|
||
| #imageContainer {} | ||
|
|
||
| #logo {} | ||
|
|
||
| #orgName { | ||
| -fx-font-size: large; | ||
| -fx-font-weight: bold; | ||
| } | ||
|
|
||
| #checkMarkContainer {} |
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,3 @@ | ||
| #body { | ||
| -fx-padding: 20px; | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.