JavaScript is disabled on your browser.
public class Main
extends javafx.application.Application
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
Field Summary
Fields
(package private) static javafx.stage.Stage
Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
Constructor Summary
Constructors
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
static javafx.stage.Stage
Get the application's primary stage.
private static void
Ask the admin that opens the application for the first time
in a text input dialog
for an initial admin password when creating the database
static void
Main entry point to the application for the operating system.
void
start (javafx.stage.Stage primaryStage)
Required method to run and open the first JavaFX window of an 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
Field Details
primaryStage
static javafx.stage.Stage primaryStage
Method Details
start
Required method to run and open the first JavaFX window of an application.
Specified by:
start
in class javafx.application.Application
Parameters:
primaryStage
- the main window/stage the scene is loaded into
Throws:
IOException
- needs to throw an IOException in case the .fxml file to open isn't found
SQLException
main
Main entry point to the application for the operating system.
Parameters:
args
- Command arguments
Throws:
SQLException
initDB
Set up database
Throws:
SQLException
- if a statement failed in the creation process
initialAdminPassword
private static String initialAdminPassword ()
Ask the admin that opens the application for the first time
in a text input dialog
for an initial admin password when creating the database
Returns:
desired admin password entered by the admin
getPrimaryStage
public static javafx.stage.Stage getPrimaryStage ()
Get the application's primary stage.
As the application only works with a single stage of which the content is only changed on scene switch,
this is a helper method to get the application's stage.
Used to switch scenes.
Implemented in Main as this class initially defines the primary stage.
Returns:
the primary stage the application runs on.