Package Main

Class ApplicationManager


  • public final class ApplicationManager
    extends java.lang.Object
    Class that initializes the stage and scene of the application Changes the roots of the scene
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static double HEIGHT  
      private static javafx.scene.Scene scene  
      private static javafx.stage.Stage stage  
      private static double WIDTH  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ApplicationManager()
      Private constructor to hinder creation of utility class
    • Method Summary

      Modifier and Type Method Description
      private static void closeProgram()
      Gives a confirmation box with the choices of exiting or not.
      static javafx.stage.Stage getStage()
      Gets the main stage of the application
      static void initialize​(javafx.stage.Stage primaryStage)
      Initializes the stage Can only be used once, when the stage and scene is still null
      static void setRoot​(SceneRoot root)
      Sets the root of the scene Uses the border pane of an object of a SceneRoot class, since the border pane is the outer layer
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stage

        private static javafx.stage.Stage stage
      • scene

        private static javafx.scene.Scene scene
    • Constructor Detail

      • ApplicationManager

        private ApplicationManager()
        Private constructor to hinder creation of utility class
    • Method Detail

      • initialize

        public static void initialize​(javafx.stage.Stage primaryStage)
        Initializes the stage Can only be used once, when the stage and scene is still null
        Parameters:
        primaryStage - is the stage used as the main stage through the whole application
      • getStage

        public static javafx.stage.Stage getStage()
        Gets the main stage of the application
        Returns:
        stage, the main stage of the application
      • setRoot

        public static void setRoot​(SceneRoot root)
        Sets the root of the scene Uses the border pane of an object of a SceneRoot class, since the border pane is the outer layer
        Parameters:
        root - an object of a subclass of the SceneRoot class
      • closeProgram

        private static void closeProgram()
        Gives a confirmation box with the choices of exiting or not. If the user exits the program the connection to the database will be closed