Class Main
java.lang.Object
javafx.application.Application
it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
it.tidalwave.ui.javafx.spi.AbstractJavaFXSpringApplication
it.tidalwave.ui.javafx.JavaFXSpringAnnotationApplication
it.tidalwave.ui.example.presentation.javafx.Main
@Configuration
@EnableSpringConfigured
@EnableAspectJAutoProxy
@ComponentScan(basePackages="it.tidalwave")
public class Main
extends JavaFXSpringAnnotationApplication
The main class extends
JavaFXSpringApplication
and invokes a starting method on a controller that boots the application.- Author:
- Fabrizio Giudici
-
Nested Class Summary
Nested classes/interfaces inherited from class it.tidalwave.ui.javafx.spi.AbstractJavaFXSpringApplication
AbstractJavaFXSpringApplication.InitParameters
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
-
Field Summary
Fields inherited from class it.tidalwave.ui.javafx.JavaFXSpringAnnotationApplication
APPLICATION_MESSAGE_BUS_BEAN_NAME
Fields inherited from class it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
applicationFxml, K_FULL_SCREEN, K_FULL_SCREEN_LOCKED, K_INITIAL_SIZE, K_LOG_DELEGATE_INVOCATIONS, K_MAXIMIZED, K_MIN_SPLASH_DURATION, splashFxml
Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
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'sApplication.fxml
A splash screen is created from a FXML resource in the same package as this class and nameSplash.fxml
, It is rendered on the screen while the system is initialised in background.protected void
onStageCreated
(org.springframework.context.ApplicationContext applicationContext) This method retrieves a reference to the main controller and boots it.Methods inherited from class it.tidalwave.ui.javafx.JavaFXSpringAnnotationApplication
createApplicationContext
Methods inherited from class it.tidalwave.ui.javafx.spi.AbstractJavaFXSpringApplication
createParent, initializeInBackground, launch, onClosing, onStageCreated, params
Methods inherited from class it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
createScene, getExecutor, init, start
Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
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
-
onStageCreated
protected void onStageCreated(@Nonnull org.springframework.context.ApplicationContext applicationContext) This method retrieves a reference to the main controller and boots it.- Overrides:
onStageCreated
in classAbstractJavaFXSpringApplication
- Parameters:
applicationContext
- the application context
-