Class MainController

java.lang.Object
ui.controller.MainController

public class MainController extends Object
Main controller for the application. Manages page navigation, the donation flow, and the organization detail popup.
  • Constructor Details

    • MainController

      public MainController()
  • Method Details

    • initialize

      public void initialize()
    • loadPage

      public void loadPage(Page page) throws IOException
      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

      public void loadDonationPage(Organization org) throws IOException
      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

      public void showOrganizationDetail(Organization org)
      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