java.lang.Object
javafx.application.Application
app.supernaut.fx.internal.OpenJfxProxyApplication
Internal Supernaut.fx implementation of
Application
. As a static proxy object for
ApplicationDelegate
, it delegates OpenJFX Application
lifecycle calls to ApplicationDelegate
and makes it more independent of OpenJFX.
Tagline:
We subclass
Application
so you don't have to.
To create a Supernaut.fx app, write a class that implements ApplicationDelegate
.
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic FxLauncher
Launcher must set this global before calling constructorFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a JavaFX application that wraps anApplicationDelegate
Note thatFxLauncher.createAppDelegate(Application)
will wait on the background app initialized latch so this constructor will block until the background app is created and initialized. -
Method Summary
Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet
-
Field Details
-
configuredLauncher
Launcher must set this global before calling constructor
-
-
Constructor Details
-
OpenJfxProxyApplication
public OpenJfxProxyApplication()Create a JavaFX application that wraps anApplicationDelegate
Note thatFxLauncher.createAppDelegate(Application)
will wait on the background app initialized latch so this constructor will block until the background app is created and initialized. Constructed on the JavaFX application thread
-
-
Method Details
-
init
Supernaut.fx implementation ofApplication.init()
. Initializes the ApplicationContext and loads and dependency injects the Application singleton. Called on the JavaFX-launcher thread- Overrides:
init
in classjavafx.application.Application
- Throws:
Exception
- if something goes wrong
-
start
Supernaut.fx implementation ofApplication.start(javafx.stage.Stage)
. Calls the application's implementation ofApplicationDelegate.start(javafx.stage.Stage)
- Specified by:
start
in classjavafx.application.Application
- Parameters:
primaryStage
- The primary Stage for the application- Throws:
Exception
- if something goes wrong
-
stop
SupernautFX implementation of Application#stop(). Stops the SupernautFxApp and then stops the Micronaut ApplicationContext- Overrides:
stop
in classjavafx.application.Application
- Throws:
Exception
- if something goes wrong
-