Class DonationFlowController

java.lang.Object
ui.controller.donation.DonationFlowController

public class DonationFlowController extends Object
Manages the multi-step donation flow. Handles navigation between donation steps and hides the navbar during the flow.
  • Constructor Details

    • DonationFlowController

      public DonationFlowController(javafx.scene.layout.BorderPane mainPane, NavbarController navbarController)
      Creates a new DonationFlowController.
      Parameters:
      mainPane - the main BorderPane to load donation steps into
      navbarController - the navbar controller used to hide/show the navbar
  • Method Details

    • start

      public void start(Organization org) throws IOException
      Starts the donation flow for the given organization. Navigates to the amount step if signed in, otherwise to the not logged in step.
      Parameters:
      org - the organization to donate to
      Throws:
      IOException - if an FXML file cannot be loaded
    • setOnNavigate

      public void setOnNavigate(Consumer<Page> onNavigate)
      Sets the callback for navigating to a page after the donation flow ends.
      Parameters:
      onNavigate - the navigation callback