-
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: created files associated with BrowsePage
- Loading branch information
Showing
6 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/main/java/edu/group5/app/control/BrowseCardController.java
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,9 @@ | ||
| package edu.group5.app.control; | ||
|
|
||
| public class BrowseOrgController { | ||
| private final MainController controller; | ||
|
|
||
| public BrowseOrgController(MainController mainController) { | ||
| this.controller = mainController; | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/edu/group5/app/control/BrowsePageController.java
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,4 @@ | ||
| package edu.group5.app.control; | ||
|
|
||
| public class BrowsePageController { | ||
| } |
63 changes: 63 additions & 0 deletions
63
src/main/java/edu/group5/app/view/browsepage/BrowseCard.java
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,63 @@ | ||
| package edu.group5.app.view.browsepage; | ||
|
|
||
| import edu.group5.app.control.BrowseOrgController; | ||
| import javafx.geometry.Pos; | ||
| import javafx.scene.image.Image; | ||
| import javafx.scene.image.ImageView; | ||
| import javafx.scene.layout.StackPane; | ||
| import javafx.scene.layout.VBox; | ||
| import javafx.scene.text.Text; | ||
|
|
||
| public class BrowseOrg extends VBox { | ||
| private final BrowseOrgController controller; | ||
|
|
||
| public BrowseOrg(BrowseOrgController browseOrgController, String img, String name) { | ||
| this.controller = browseOrgController; | ||
| setId("mainContainer"); | ||
| getStylesheets().add(getClass().getResource("/browsepage/browse_org.css").toExternalForm()); | ||
|
|
||
| getChildren().addAll( | ||
| imageContainer(img), | ||
| orgName(name), | ||
| checkMarkContainer() | ||
| ); | ||
|
|
||
| setPrefWidth(100); | ||
| setAlignment(Pos.CENTER); | ||
| } | ||
|
|
||
| private StackPane imageContainer(String img) { | ||
| StackPane imageContainer = new StackPane(); | ||
| imageContainer.setId("imageContainer"); | ||
| ImageView logo = new ImageView( | ||
| new Image(getClass().getResource(img).toExternalForm()) | ||
| ); | ||
| logo.setId("logo"); | ||
| logo.setSmooth(true); | ||
| logo.setPreserveRatio(true); | ||
| logo.setFitWidth(100); | ||
| imageContainer.getChildren().add(logo); | ||
| return imageContainer; | ||
| } | ||
|
|
||
| private Text orgName(String text) { | ||
| Text orgName = new Text(text); | ||
| orgName.setId("orgName"); | ||
| return orgName; | ||
| } | ||
|
|
||
| private StackPane checkMarkContainer() { | ||
| StackPane checkMarkContainer = new StackPane(); | ||
| checkMarkContainer.setId("checkMarkContainer"); | ||
| ImageView verifiedCheck = new ImageView( | ||
| new Image(getClass().getResource("/verified_check.png").toExternalForm()) | ||
| ); | ||
| verifiedCheck.setPreserveRatio(true); | ||
| verifiedCheck.setSmooth(true); | ||
|
|
||
|
|
||
| checkMarkContainer.setAlignment(Pos.CENTER_LEFT); | ||
| checkMarkContainer.getChildren().add(verifiedCheck); | ||
| return checkMarkContainer; | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/edu/group5/app/view/browsepage/BrowsePageView.java
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,4 @@ | ||
| package edu.group5.app.view.browsepage; | ||
|
|
||
| public class BrowsePageView { | ||
| } |
Empty file.
Empty file.