Class MainApplication

java.lang.Object
javafx.application.Application
edu.ntnu.stud.controller.MainApplication

public class MainApplication extends javafx.application.Application
The main application class for the QuickList application.
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.application.Application

    javafx.application.Application.Parameters
  • Field Summary

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the header of the application.
    static void
    launcher(String[] args)
    The main method to launch the application.
    void
    showCookBookFrame(javafx.scene.layout.VBox vbox, CookBookFrame cookBookFrame)
    Shows the cookbook frame.
    void
    showRecipeFrame(int jsonIndex, org.json.JSONArray jsonArray)
    Shows the recipe frame for the selected recipe.
    void
    start(javafx.stage.Stage primaryStage)
    The start method for the application and set up the components.

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MainApplication

      public MainApplication()
  • Method Details

    • launcher

      public static void launcher(String[] args)
      The main method to launch the application.
      Parameters:
      args - Arguments from user input.
    • start

      public void start(javafx.stage.Stage primaryStage) throws IOException
      The start method for the application and set up the components.
      Specified by:
      start in class javafx.application.Application
      Parameters:
      primaryStage - The primary stage for the application.
      Throws:
      IOException - If an error occurs while reading the JSON file.
    • showCookBookFrame

      public void showCookBookFrame(javafx.scene.layout.VBox vbox, CookBookFrame cookBookFrame)
      Shows the cookbook frame.
      Parameters:
      vbox - The VBox containing the frames.
      cookBookFrame - The cookbook frame.
    • showRecipeFrame

      public void showRecipeFrame(int jsonIndex, org.json.JSONArray jsonArray)
      Shows the recipe frame for the selected recipe.
      Parameters:
      jsonIndex - The index of the selected recipe in the JSON file.
      jsonArray - The JSON array containing the recipes.
    • getHeader

      public Header getHeader()
      Returns the header of the application.
      Returns:
      The header of the application.