Module app.supernaut.fx.micronaut
Package app.supernaut.fx.micronaut
Class MicronautFxLauncher.MicronautAppFactory
java.lang.Object
app.supernaut.fx.micronaut.MicronautFxLauncher.MicronautAppFactory
- All Implemented Interfaces:
FxLauncherAbstract.AppFactory
- Enclosing class:
- MicronautFxLauncher
public static class MicronautFxLauncher.MicronautAppFactory
extends Object
implements FxLauncherAbstract.AppFactory
Implement of AppFactory using either a Micronaut
BeanContext
or ApplicationContext
-
Constructor Summary
ConstructorsConstructorDescriptionMicronautAppFactory
(boolean useApplicationContext) Constructor for Micronaut implementation of AppFactory -
Method Summary
Modifier and TypeMethodDescriptioncreateAppDelegate
(Class<? extends ApplicationDelegate> appDelegateClass, javafx.application.Application proxyApplication) Create the background class instance from aClass
objectcreateBackgroundApp
(Class<? extends BackgroundApp> backgroundAppClass) Create the background class instance from aClass
objectprotected void
initializeBeanContext
(io.micronaut.context.BeanContext context, javafx.application.Application proxyApplication) SubclassMicronautFxLauncher.MicronautAppFactory
and override this method to customize yourBeanContext
.
-
Constructor Details
-
MicronautAppFactory
Constructor for Micronaut implementation of AppFactory- Parameters:
useApplicationContext
- createApplicationContext
if true,BeanContext
if false
-
-
Method Details
-
createBackgroundApp
Create the background class instance from aClass
object- Specified by:
createBackgroundApp
in interfaceFxLauncherAbstract.AppFactory
- Parameters:
backgroundAppClass
- the class to create- Returns:
- application instance
-
createAppDelegate
public ApplicationDelegate createAppDelegate(Class<? extends ApplicationDelegate> appDelegateClass, javafx.application.Application proxyApplication) Create the background class instance from aClass
object- Specified by:
createAppDelegate
in interfaceFxLauncherAbstract.AppFactory
- Parameters:
appDelegateClass
- the class to createproxyApplication
- a reference to the proxyApplication
created by Supernaut.FX- Returns:
- application instance
-
initializeBeanContext
protected void initializeBeanContext(io.micronaut.context.BeanContext context, javafx.application.Application proxyApplication) SubclassMicronautFxLauncher.MicronautAppFactory
and override this method to customize yourBeanContext
.- Parameters:
context
- The Micronaut BeanContext to initializeproxyApplication
- The proxy implementation instance ofApplication
-