Class OrganizationDetailController
java.lang.Object
ui.controller.OrganizationDetailController
Controller for the organization detail popup.
Displays organization name, verified status, description and logo.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidsetOnClose(Runnable onClose) Sets the callback to invoke when the user closes the popup.voidsetOnDonate(Consumer<Organization> onDonate) Sets the callback to invoke when the user clicks Donate.voidsetOrganization(Organization org, OrganizationDetails details) Sets the organization and its details, and updates all UI elements.
-
Constructor Details
-
OrganizationDetailController
public OrganizationDetailController()
-
-
Method Details
-
setOrganization
Sets the organization and its details, and updates all UI elements. Cuts the description at 300 characters if it is too long.- Parameters:
org- the organization to displaydetails- the scraped details including description and logo URL
-
setOnDonate
Sets the callback to invoke when the user clicks Donate.- Parameters:
onDonate- the callback with the selected organization
-
setOnClose
Sets the callback to invoke when the user closes the popup.- Parameters:
onClose- the callback to run on close
-
handleClose
public void handleClose() -
handleDonate
public void handleDonate() -
handleVisitWebsite
public void handleVisitWebsite() -
handleReadMore
public void handleReadMore()
-