Module it.tidalwave.ui.javafx
Package it.tidalwave.ui.javafx.spi
Class AbstractJavaFXSpringApplication
java.lang.Object
javafx.application.Application
it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
it.tidalwave.ui.javafx.spi.AbstractJavaFXSpringApplication
- Direct Known Subclasses:
JavaFXSpringAnnotationApplication,JavaFXSpringApplication
A base class for all variants of JavaFX applications with Spring.
- Author:
- Fabrizio Giudici
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe initialisation parameters to pass tolaunch(Class, InitParameters).Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final org.springframework.scheduling.concurrent.ThreadPoolTaskExecutorprotected final JavaFXBinderprotected final JavaFXMenuBarControlstatic final Consumer<javafx.scene.Scene> Configures the JMetro style, dark mode.static final Consumer<javafx.scene.Scene> Configures the JMetro style, light mode.protected final JavaFXToolBarControlFields 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, splashFxmlFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.springframework.context.ConfigurableApplicationContextReturns a created application context..protected NodeAndDelegate<?> protected javafx.scene.ScenecreateScene(javafx.scene.Parent parent) protected voidexit()getBeans()protected voidstatic voidlaunch(Class<? extends javafx.application.Application> appClass, AbstractJavaFXSpringApplication.InitParameters initParameters) Launches the application.protected final voidInvoked when the mainStageis being closed.protected final voidonStageCreated(javafx.stage.Stage stage, NodeAndDelegate<?> applicationNad) protected voidonStageCreated(org.springframework.context.ApplicationContext applicationContext) Invoked when theStageis created and theApplicationContexthas been initialized.protected static AbstractJavaFXSpringApplication.InitParametersparams()Returns an empty set of parameters.Methods inherited from class it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
init, startMethods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Field Details
-
STYLE_METRO_LIGHT
Configures the JMetro style, light mode. @since 3.0-ALPHA-1 -
STYLE_METRO_DARK
Configures the JMetro style, dark mode. @since 3.0-ALPHA-1 -
APPLICATION_MESSAGE_BUS_BEAN_NAME
- See Also:
-
executor
protected final org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor -
javaFxBinder
-
toolBarControl
-
-
Constructor Details
-
AbstractJavaFXSpringApplication
protected AbstractJavaFXSpringApplication()
-
-
Method Details
-
launch
public static void launch(@Nonnull Class<? extends javafx.application.Application> appClass, @Nonnull AbstractJavaFXSpringApplication.InitParameters initParameters) Launches the application.- Parameters:
appClass- the class of the application to instantiateinitParameters- the initialisation parameters
-
getBeans
-
params
Returns an empty set of parameters. to populate and pass tolaunch(Class, InitParameters)- Returns:
- an empty set of parameters
- Since:
- 1.1-ALPHA-6
-
createParent
- Specified by:
createParentin classJavaFXApplicationWithSplash
-
initializeInBackground
protected void initializeInBackground()- Specified by:
initializeInBackgroundin classJavaFXApplicationWithSplash
-
createApplicationContext
@Nonnull protected abstract org.springframework.context.ConfigurableApplicationContext createApplicationContext()Returns a created application context..- Returns:
- a created application context.
-
createScene
protected javafx.scene.Scene createScene(@Nonnull javafx.scene.Parent parent) - Overrides:
createScenein classJavaFXApplicationWithSplash
-
onStageCreated
protected final void onStageCreated(@Nonnull javafx.stage.Stage stage, @Nonnull NodeAndDelegate<?> applicationNad) - Overrides:
onStageCreatedin classJavaFXApplicationWithSplash
-
onStageCreated
protected void onStageCreated(@Nonnull org.springframework.context.ApplicationContext applicationContext) Invoked when theStageis created and theApplicationContexthas 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.- Parameters:
applicationContext- the application context
-
onClosing
protected final void onClosing()Invoked when the mainStageis being closed. This method is called in the JavaFX thread.- Overrides:
onClosingin classJavaFXApplicationWithSplash
-
exit
protected void exit()
-