Package edu.ntnu.stud.controller
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 -
Method Summary
Modifier and TypeMethodDescriptionReturns the header of the application.static void
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
-
Constructor Details
-
MainApplication
public MainApplication()
-
-
Method Details
-
launcher
The main method to launch the application.- Parameters:
args
- Arguments from user input.
-
start
The start method for the application and set up the components.- Specified by:
start
in classjavafx.application.Application
- Parameters:
primaryStage
- The primary stage for the application.- Throws:
IOException
- If an error occurs while reading the JSON file.
-
showCookBookFrame
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
Returns the header of the application.- Returns:
- The header of the application.
-