-
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: CharityPage is working, text black is not working for some reason
- Loading branch information
AdrianBalunan
committed
Mar 13, 2026
1 parent
b655620
commit dcded4b
Showing
1 changed file
with
31 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 31 additions & 1 deletion
32
...pplication/src/main/java/ntnu/systemutvikling/team6/controller/CharityPageController.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 |
|---|---|---|
| @@ -1,11 +1,41 @@ | ||
| package ntnu.systemutvikling.team6.controller; | ||
|
|
||
| import javafx.event.ActionEvent; | ||
| import javafx.fxml.FXML; | ||
| import javafx.fxml.FXMLLoader; | ||
| import javafx.scene.Node; | ||
| import javafx.scene.Parent; | ||
| import javafx.scene.Scene; | ||
| import javafx.scene.control.Label; | ||
| import javafx.scene.layout.FlowPane; | ||
| import javafx.stage.Stage; | ||
| import ntnu.systemutvikling.team6.HmHApplication; | ||
| import ntnu.systemutvikling.team6.models.Charity; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| public class CharityPageController { | ||
| @FXML private FlowPane charityPage; | ||
| @FXML | ||
| private Label CharityDescription; | ||
|
|
||
| @FXML | ||
| private Label CharityName; | ||
| @FXML | ||
| public void initialize() {} | ||
|
|
||
| private Charity charity; | ||
| @FXML | ||
| public void setCharity(Charity charity){ | ||
| this.charity = charity; | ||
|
|
||
| CharityDescription.setText(charity.getDescription()); | ||
| CharityName.setText(charity.getName()); | ||
|
|
||
| } | ||
| public void switchToFrontPage(ActionEvent event){ | ||
| LoaderScene.LoadScene("FrontPage", event, charity); | ||
| } | ||
| public void switchToDonationPage(ActionEvent event){ | ||
| LoaderScene.LoadScene("donationPage", event, charity); | ||
| } | ||
| } |