@ConsumerType public static interface Standalone.Application extends Standalone
Before the Stage is shown, it will be passed into the
Standalone.prepareStage(Stage) method, giving developers the opportunity to
customize the stage, e.g. to initialize a
stage style. By default, prepareStage() does nothing.
Additionally, an Application component can provide a customized
StageService.ExitPolicy by overriding the Standalone.getExitPolicy() method. The
default is StageService.ExitPolicy.SHUTDOWN_ON_STAGE_EXIT.
Standalone.Application| Modifier and Type | Method and Description |
|---|---|
default javafx.scene.layout.Region |
getRootNode()
Provide this application's root layout node.
|
getExitPolicy, prepareStagedefault javafx.scene.layout.Region getRootNode()
By convention, classes implementing Standalone.Application should be derived
from Region, in which case this method will by default simply return
the Application instance. If the Application class is not
derived from Region, this class must be overridden to return the
correct root node.
Currently, IoCFX will call this method only once per instance, however this may change in future versions, so it is advised to make sure that this method does not create a new layout every time it is called.
IllegalStateException - if the implementing class is not a RegionCopyright © 2019. All rights reserved.