Class App

java.lang.Object
javafx.application.Application
ntnu.team1.application.main.App

public class App extends javafx.application.Application
JavaFX App, this is the main class of the application. Handles storing the register and saving and reading to files. Also loads fxml file
  • 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
    App()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Gets called whenever a request is made tro close the application Makes sure that was intended and saves the register
    static int
    Gets the chosen category
    Gets the register
    static void
    main​(String[] args)
    Main method
    static void
    setChosenCategory​(int id)
    Sets the chosen category
    static void
    Sets the register
    void
    start​(javafx.stage.Stage stage)
    Runs on the start of the application.

    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

    • App

      public App()
  • Method Details

    • main

      public static void main(String[] args)
      Main method
      Parameters:
      args - launch arguments
    • start

      public void start(javafx.stage.Stage stage) throws IOException
      Runs on the start of the application. Loads the scene and configures it
      Specified by:
      start in class javafx.application.Application
      Parameters:
      stage - main stage
      Throws:
      IOException - gets thrown if something fails with loading external files
    • setChosenCategory

      public static void setChosenCategory(int id)
      Sets the chosen category
      Parameters:
      id - Integer
    • getChosenCategory

      public static int getChosenCategory()
      Gets the chosen category
      Returns:
      Integer
    • setRegister

      public static void setRegister(MainRegister register)
      Sets the register
      Parameters:
      register - MainRegister
    • getRegister

      public static MainRegister getRegister()
      Gets the register
      Returns:
      Returns the MainRegister
    • alertOnExit

      public static void alertOnExit()
      Gets called whenever a request is made tro close the application Makes sure that was intended and saves the register