Class Modals
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSlightly modified version ofStagethat destroys the controller when the stage is hidden. -
Method Summary
Modifier and TypeMethodDescriptionstatic <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, Display component) Shows a controller as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, Display component, BiConsumer<javafx.stage.Stage, Display> initializer) Shows a component as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, Display component, BiConsumer<javafx.stage.Stage, Display> initializer, Map<String, Object> params, boolean destroyOnClose) Shows a controller as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, Display component, Map<String, Object> params) Shows a controller as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component) Shows a controller as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, BiConsumer<javafx.stage.Stage, Display> initializer) Shows a component as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, BiConsumer<javafx.stage.Stage, Display> initializer, Map<String, Object> params, boolean destroyOnClose) Shows a controller as a modal window.static <Display extends javafx.scene.Parent>
voidshowModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, Map<String, Object> params) Shows a controller as a modal window.
-
Method Details
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, BiConsumer<javafx.stage.Stage, Display> initializer) Shows a component as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the component will be destroyed.
Warning: If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecurrentStage- the current stage (seeFulibFxApp.stage()component- The controller to showinitializer- the initializer for passing more arguments to the stage and controller
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, Display component, BiConsumer<javafx.stage.Stage, Display> initializer) Shows a component as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the component will be destroyed.
Warning: If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecomponent- The controller to showinitializer- the initializer for passing more arguments to the stage and controller
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, Map<String, Object> params) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the controller will be destroyed. If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecurrentStage- the current stagecomponent- the class of the controller to showparams- the parameters to pass to the controller
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, Display component, Map<String, Object> params) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the controller will be destroyed. If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecomponent- the class of the controller to showparams- the parameters to pass to the controller
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the controller will be destroyed. If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecurrentStage- the current stagecomponent- the class of the controller to show
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, Display component) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
When closing the window, the controller will be destroyed. If the
Window.setOnCloseRequest(EventHandler)method is overridden, the controller will not be destroyed automatically.- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecomponent- the class of the controller to show
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, Display component, BiConsumer<javafx.stage.Stage, Display> initializer, Map<String, Object> params, boolean destroyOnClose) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
If destroyOnClose is enabled, when closing (or to be more exact, hiding) the window, the controller will be destroyed. The controller will be destroyed before the stage is hidden.
- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecomponent- the class of the controller to showinitializer- the initializer for passing more arguments to the stage and controllerparams- the parameters to pass to the controllerdestroyOnClose- if the controller should be destroyed when the window is closed
-
showModal
public static <Display extends javafx.scene.Parent> void showModal(FulibFxApp app, javafx.stage.Stage currentStage, Display component, BiConsumer<javafx.stage.Stage, Display> initializer, Map<String, Object> params, boolean destroyOnClose) Shows a controller as a modal window.Important: The component shouldn't be initialized/rendered before calling this method.
If destroyOnClose is enabled, when closing (or to be more exact, hiding) the window, the controller will be destroyed. The controller will be destroyed before the stage is hidden.
- Type Parameters:
Display- the type of the controller- Parameters:
app- the app instancecurrentStage- the current stagecomponent- the class of the controller to showinitializer- the initializer for passing more arguments to the stage and controllerparams- the parameters to pass to the controller
-