Skip to content

Commit

Permalink
feat: added javadoc to more pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheaGjerde committed Apr 9, 2026
1 parent e1cda6f commit bd56a1d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/edu/group5/app/view/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;

/**
* A main header for the app.
*
* <p>The header consists of a logo button to homepage,
* a navigation bar with buttons to home page, causes page,
* and about us page. The header also has a profile button
* in the upper right corner.</p>
*/
public class Header extends BorderPane {
private final NavigationController controller;

Expand Down
17 changes: 17 additions & 0 deletions src/main/java/edu/group5/app/view/causespage/CausesPageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
import java.util.Map;
import java.util.stream.Collectors;

/**
* A view for the causes page.
*
* <p>This page allows users to browse and search
* for organizations they may want to donate to.
* Organizations are displayed in a grid layout,
* with four organizations per row. Each organization
* is represented as a clickable card containing its name and logo,
* which navigates to the organization's detail page. </p>
*
* <p>The page includes a search field that filters the
* displayed organizations based on user input.</p>
*
* <p>Logos are fetched asynchronously, and a loading indicator
* is shown while the data is being retrieved. If a logo cannot be loaded,
* a fallback "no image" is displayed.</p>
*/
public class CausesPageView extends BorderPane {
private final AppState appState;
private final NavigationController nav;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/edu/group5/app/view/causespage/OrganizationCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;

/**
* OrganizationCard represent a single organization card
* in the causes page.
*
* <p>The card displays the organization's logo, name, and verification
* checkmark. If no logo is available, a fallback text ("No image") is shown.</p>
*
* <p>The card is clickable. When pressed it navigates
* to the organization's detail page.</p>
*/
public class OrganizationCard extends VBox {
private final AppState appState;
private final Organization organization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@

import java.util.Objects;

/**
* A view for displaying information about a selected organization.
*
* <p>The page shows the organization's logo, name, and description.
* If no logo is available, a fallback "No image" is displayed.</p>
*
* <p>The page also includes a donate button that navigates to the
* donation page, and a back button to return to the causes page.</p>
*/
public class OrganizationPageView extends BorderPane {
private final AppState appState;
private final NavigationController nav;
Expand Down

0 comments on commit bd56a1d

Please sign in to comment.