java.lang.Object
edu.ntnu.stud.controller.framecontroller.Header

public class Header extends Object
The Header class is a controller class for the header of the application. It contains buttons for the cookbook, shopping list and inventory. The buttons are made up of a toggle button with an icon and a label representing the number of notifications.
  • Constructor Details

    • Header

      public Header() throws IOException
      Constructor for the Header class. Loads the FXML file and sets up the buttons with icons and notification labels.
      Throws:
      IOException - If the FXML file cannot be loaded
  • Method Details

    • getHeader

      public javafx.scene.layout.BorderPane getHeader()
      Returns the header pane.
      Returns:
      The header pane
    • incrementCookBookNotificationCount

      public void incrementCookBookNotificationCount()
      Increments the notification count for the cookbook button. This is unused in the current implementation, because we do not have a use for notifications in the cookbook. The method is kept for easy implementation of notifications in the future.
    • incrementShoppingListNotificationCount

      public void incrementShoppingListNotificationCount()
      Increments the notification count for the shopping list button.
    • incrementInventoryNotificationCount

      public void incrementInventoryNotificationCount()
      Increments the notification count for the inventory button. This is unused in the current implementation, because we do not have a use for notifications in the inventory. The method is kept for easy implementation of notifications in the future.
    • clearCookBookNotificationCount

      public void clearCookBookNotificationCount()
      Clears the notification count for the cookbook button.
    • clearShoppingListNotificationCount

      public void clearShoppingListNotificationCount()
      Clears the notification count for the shopping list button.
    • clearInventoryNotificationCount

      public void clearInventoryNotificationCount()
      Clears the notification count for the inventory button.
    • getCookBookButton

      public javafx.scene.layout.StackPane getCookBookButton()
      Returns the cookbook button.
      Returns:
      The cookbook button
    • getShoppingListButton

      public javafx.scene.layout.StackPane getShoppingListButton()
      Returns the shopping list button.
      Returns:
      The shopping list button
    • getInventoryButton

      public javafx.scene.layout.StackPane getInventoryButton()
      Returns the inventory button.
      Returns:
      The inventory button