Class Main
- java.lang.Object
-
- javafx.application.Application
-
- it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
-
- it.tidalwave.ui.javafx.JavaFXSpringApplication
-
- it.tidalwave.role.ui.javafx.example.large.Main
-
public class Main extends JavaFXSpringApplication
The main class extendsJavaFXSpringApplication
and invokes a starting method on a controller that boots the application.- Author:
- Fabrizio Giudici
-
-
Field Summary
-
Fields inherited from class it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
applicationFxml, splashFxml
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
This method allows to change some default settings, if needed.static void
main(java.lang.String... args)
Usuallymain()
does nothing more than a typicalmain()
of a typical JavaFX application.protected void
onStageCreated(org.springframework.context.ApplicationContext applicationContext)
Invoked when theStage
is created and theApplicationContext
has been initialized.-
Methods inherited from class it.tidalwave.ui.javafx.JavaFXSpringApplication
createParent, initializeInBackground, onClosing, onStageCreated
-
Methods inherited from class it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
getExecutor, isOSX, start
-
-
-
-
Method Detail
-
main
public static void main(@Nonnull java.lang.String... args)
Usuallymain()
does nothing more than a typicalmain()
of a typical JavaFX application. JavaFX and Spring are automatically booted with an implicit configuration:- The FXML resource for the main UI is loaded from the same package as this class, and the name's
Application.fxml
- A splash screen is created from a FXML resource in the same package as this class and name
Splash.fxml
, It is rendered on the screen while the system is initialised in background.
- The FXML resource for the main UI is loaded from the same package as this class, and the name's
-
init
public void init()
This method allows to change some default settings, if needed.- Overrides:
init
in classJavaFXApplicationWithSplash
-
onStageCreated
protected void onStageCreated(@Nonnull org.springframework.context.ApplicationContext applicationContext)
Invoked when theStage
is created and theApplicationContext
has been initialized. Typically the main class overrides this, retrieves a reference to the main controller and boots it. This method is executed in a background thread. This method retrieves a reference to the main controller and boots it.- Overrides:
onStageCreated
in classJavaFXSpringApplication
- Parameters:
applicationContext
- the application context
-
-