Class MainController
java.lang.Object
ui.controller.MainController
Main controller for the application.
Manages page navigation, the donation flow, and the organization detail popup.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidStarts the donation flow for the given organization.voidLoads and displays the given page in the main content area.voidShows the organization detail popup for the given organization.
-
Constructor Details
-
MainController
public MainController()
-
-
Method Details
-
initialize
public void initialize() -
loadPage
Loads and displays the given page in the main content area. Sets up the appropriate controller callbacks for each page.- Parameters:
page- the page to load- Throws:
IOException- if the FXML file cannot be loaded
-
loadDonationPage
Starts the donation flow for the given organization.- Parameters:
org- the organization to donate to- Throws:
IOException- if the FXML file cannot be loaded
-
showOrganizationDetail
Shows the organization detail popup for the given organization. Fetches description and logo from Innsamlingskontrollen and displays them.- Parameters:
org- the organization to show details for
-