SudokuFX
|
The application main class. More...
Classes | |
interface | IPrimaryStageView |
Interface for the primary stage view. More... | |
Public Member Functions | |
void | start (final Stage splashScreenStage) |
Initializes the application by setting up the splash screen and loading the main application context. | |
Static Public Member Functions | |
static void | main (String[] args) |
Main entry point for the application. | |
Private Member Functions | |
Task< Void > | createSpringContextTask () |
Creates a new Task that initializes the Spring context. | |
PauseTransition | getPauseTransition (String fxmlName, long minimumTimelapse) |
Creates a PauseTransition to delay loading of the next view. | |
void | handleSpringContextTaskFailed (Throwable throwable) |
Handles errors that occur during the Spring context initialization task. | |
void | handleSpringContextTaskSuccess (long startTime) |
Handles the success of the Spring context initialization task. | |
void | initializeFxmlService () |
Initialize the FxmlService if needed and set his DynamicFontSize. | |
Static Private Member Functions | |
static void | initScene (Stage splashScreenStage) |
Initializes the main scene. | |
static void | sqlInvalidAuthorization (Exception e, SQLInvalidAuthorizationSpecException sqlException) |
Handles SQL invalid authorization exceptions. | |
Private Attributes | |
final SpringContext | context = new SpringContext(this) |
FxmlService | fxmlService |
IPrimaryStageView | iPrimaryStageView |
ISplashScreenView | isplashScreenView |
Static Private Attributes | |
static Scene | scene |
The application main class.
This class initializes the application, manages the splash screen, and handles the transition to the main application view.
|
private |
Creates a new Task that initializes the Spring context.
This task is intended to be run in a background thread to avoid blocking the JavaFX application thread.
|
private |
Creates a PauseTransition to delay loading of the next view.
fxmlName | The name of the FXML file to load |
minimumTimelapse | The minimum time to pause |
|
private |
Handles errors that occur during the Spring context initialization task.
This method is called when the initialization task fails.
It attempts to initialize the FXML service, logs the error, and manages the response based on the type of exception encountered. If the exception is related to SQL authorization, it displays an appropriate error screen; otherwise, it exits the application.
throwable | The exception that occurred during the initialization process. |
|
private |
Handles the success of the Spring context initialization task.
This method is called when the initialization task completes successfully.
startTime | The time (in milliseconds) when the initialization started. This is used to apply the minimum delay of 1s before starting the transition. |
|
private |
Initialize the FxmlService if needed and set his DynamicFontSize.
|
staticprivate |
Initializes the main scene.
splashScreenStage | The stage used for the splash screen |
|
static |
Main entry point for the application.
args | Command line arguments |
|
staticprivate |
Handles SQL invalid authorization exceptions.
e | The general exception |
sqlException | The specific SQL invalid authorization exception |
void fr.softsf.sudokufx.SudoMain.start | ( | final Stage | splashScreenStage | ) |
Initializes the application by setting up the splash screen and loading the main application context.
This method performs the following:
splashScreenStage | The primary stage for displaying the splash screen. |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |