public final class Stages extends Object
Stage instance on the JavaFX thread.| Modifier and Type | Method and Description |
|---|---|
static CompletionStage<javafx.stage.Stage> |
scheduleDisplaying(javafx.stage.Stage stage)
Schedules a stage for displaying.
|
static CompletionStage<javafx.stage.Stage> |
scheduleHiding(javafx.stage.Stage stage)
Schedules a stage for hiding
|
static CompletionStage<javafx.stage.Stage> |
setStylesheet(javafx.stage.Stage stage,
FxmlStylesheet stylesheet)
|
static CompletionStage<javafx.stage.Stage> |
setStylesheet(javafx.stage.Stage stage,
String stylesheet)
Boilerplate for setting the stylesheet of a given stage via Java rather than FXML.
|
static CompletionStage<javafx.stage.Stage> |
stageOf(String title,
javafx.scene.layout.Pane rootPane)
Creates a Stage.
|
public static CompletionStage<javafx.stage.Stage> stageOf(String title, javafx.scene.layout.Pane rootPane)
title - The title of the stagerootPane - The scene's baseCompletionStage to have monitoring over the state of the asynchronous creation. It will
eventually contain the newly created stage.public static CompletionStage<javafx.stage.Stage> scheduleDisplaying(javafx.stage.Stage stage)
stage - The stage to schedule displaying of.CompletionStage to have monitoring over the state of the asynchronous operationpublic static CompletionStage<javafx.stage.Stage> scheduleHiding(javafx.stage.Stage stage)
stage - The stage to shcedule hiding of.CompletionStage to have monitoring over the state of the asynchronous operationpublic static CompletionStage<javafx.stage.Stage> setStylesheet(javafx.stage.Stage stage, String stylesheet)
stage - The stage whose stylesheet we are changingstylesheet - The new stylesheet in external form. That is, if it is a file, including the protocol info
"file:/" before the actual path. Use Resources.getResourceURL(String) and URL.toExternalForm() if your css file is included in the classpath.CompletionStage to have monitoring over the state of the asynchronous operationpublic static CompletionStage<javafx.stage.Stage> setStylesheet(javafx.stage.Stage stage, FxmlStylesheet stylesheet)
stage - The stage to apply the style tostylesheet - The FxmlStylesheet pointing to the stylesheet to applyCompletionStage to have monitoring over the state of the asynchronous operationCopyright © 2018. All rights reserved.