![]() |
SudokuFX
|
Main JavaFX application class launching the UI and initializing the Spring context. More...
Inheritance diagram for fr.softsf.sudokufx.SudoMain:
Collaboration diagram for fr.softsf.sudokufx.SudoMain:Public Member Functions | |
| void | start (final Stage stage) |
| Initializes the application by: | |
Static Public Member Functions | |
| static void | main (String[] args) |
| Main entry point for the application. | |
Private Member Functions | |
| PauseTransition | createViewTransition (String fxmlName, long minimumTimelapse) |
| Creates a pause before loading the specified FXML view. | |
| void | handleSpringContextTaskFailed (Throwable throwable) |
| Handles failure of the Spring context initialization task. | |
| void | handleSpringContextTaskSuccess (long startTime) |
| Handles the success of the Spring context initialization task. | |
| void | initializeCoordinator () |
| Ensures the Coordinator is initialized if not already (e.g., if Spring injection failed). | |
Static Private Member Functions | |
| static void | logSqlInvalidAuthorization (Exception e, SQLInvalidAuthorizationSpecException sqlException) |
| Logs an SQLInvalidAuthorizationSpecException with optional authentication details. | |
Private Attributes | |
| final SpringContext | context = new SpringContext(this) |
| Coordinator | coordinator |
| IMainView | iMainView |
| ISplashScreenView | iSplashScreenView |
| Stage | stage |
Static Private Attributes | |
| static final Logger | LOG = LoggerFactory.getLogger(SudoMain.class) |
| static final long | MINIMUM_TRANSITION_DELAY_MS = 500L |
Main JavaFX application class launching the UI and initializing the Spring context.
Manages the splash screen, asynchronous Spring initialization, error handling, and view transitions. Handles fatal errors by showing a crash screen or exiting.
Uses a Coordinator component for view management and leverages ExceptionTools for centralized exception handling.
This class is the JavaFX entry point and controls the primary Stage lifecycle.
|
private |
Creates a pause before loading the specified FXML view.
| fxmlName | the FXML file name to load (must not be null or blank) |
| minimumTimelapse | the pause duration in milliseconds |
| IllegalArgumentException | if fxmlName is null or blank |
|
private |
Handles failure of the Spring context initialization task.
If throwable is null, logs and throws an IllegalArgumentException. Otherwise:
If any exception occurs during the handling itself, it is logged and the application exits.
| throwable | the exception thrown during initialization (must not be null) |
Here is the call graph for this function:
|
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 before starting the transition. |
Here is the call graph for this function:
|
private |
Ensures the Coordinator is initialized if not already (e.g., if Spring injection failed).
In all cases, sets the default scene, dynamic font size handler, and HostServices.
|
staticprivate |
Logs an SQLInvalidAuthorizationSpecException with optional authentication details.
Throws an IllegalArgumentException if any argument is null. Logs the exception, and if the SQL state is "28000" or "28501", logs a specific authentication message.
| e | the general exception (must not be null) |
| sqlException | the SQL authorization exception (must not be null) |
| IllegalArgumentException | if either argument is null |
|
static |
Main entry point for the application.
| args | Command line arguments |
| void fr.softsf.sudokufx.SudoMain.start | ( | final Stage | stage | ) |
Initializes the application by:
| stage | the primary JavaFX stage used to display the UI |
Here is the call graph for this function:
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
private |