Package Main
Class ApplicationManager
- java.lang.Object
-
- Main.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
-
-
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 applicationstatic void
initialize(javafx.stage.Stage primaryStage)
Initializes the stage Can only be used once, when the stage and scene is still nullstatic 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
-
-
-
Field Detail
-
WIDTH
private static final double WIDTH
- See Also:
- Constant Field Values
-
HEIGHT
private static final double HEIGHT
- See Also:
- Constant Field Values
-
stage
private static javafx.stage.Stage stage
-
scene
private static javafx.scene.Scene scene
-
-
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
-
-