Klasse StageManager
java.lang.Object
com.flexganttfx.extras.util.StageManager
A manager for storing the location and dimension of a stage across user
sessions. Installing this manager on a stage will ensure that a stage will
present itself at the same location and in the same size that it had when
the user closed it the last time. This manager also works with multiple
screens and will ensure that the window becomes visible if the last used
screen is no longer available. In that case the stage will be shown centered
on the primary screen with the specified min width and min height.
Based on the original StageManager from the GemsFX library.
- Seit:
- 1.0
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic StageManagerInstalls a new manager for the given stage.static StageManagerInstalls a new manager for the given stage.static StageManagerinstall(Stage stage, Preferences preferences) Installs a new manager for the given stage.static StageManagerinstall(Stage stage, Preferences preferences, double minWidth, double minHeight) Installs a new manager for the given stage.final booleanReturns whether full-screen and maximized states are persisted and restored.final voidsetSupportFullScreenAndMaximized(boolean supportFullScreenAndMaximized) Sets whether full-screen and maximized states should be persisted and restored.
-
Methodendetails
-
install
Installs a new manager for the given stage. The location and dimension information will be stored in the user preferences at the given path. The default values for the minimum width is 850 and for the minimum height is 600.- Parameter:
stage- the stage to persist and restorepreferencesPath- the java.util preferences path used for storing the information- Gibt zurück:
- the installed manager
-
install
Installs a new manager for the given stage. The location and dimension information will be stored in the given preferences. The default values for the minimum width is 850 and for the minimum height is 600.- Parameter:
stage- the stage to persist and restorepreferences- the java.util preferences used for storing the information- Gibt zurück:
- the installed manager
-
install
public static StageManager install(Stage stage, String preferencesPath, double minWidth, double minHeight) Installs a new manager for the given stage. The location and dimension information will be stored in the user preferences at the given path.- Parameter:
stage- the stage to persist and restorepreferencesPath- the java.util preferences path used for storing the informationminWidth- the minimum width that will be used for the stageminHeight- the minimum height that will be used for the stage- Gibt zurück:
- the installed manager
-
install
public static StageManager install(Stage stage, Preferences preferences, double minWidth, double minHeight) Installs a new manager for the given stage. The location and dimension information will be stored in the given preferences.- Parameter:
stage- the stage to persist and restorepreferences- the java.util preferences used for storing the informationminWidth- the minimum width that will be used for the stageminHeight- the minimum height that will be used for the stage- Gibt zurück:
- the installed manager
-
isSupportFullScreenAndMaximized
public final boolean isSupportFullScreenAndMaximized()Returns whether full-screen and maximized states are persisted and restored.- Gibt zurück:
trueif full-screen and maximized support is enabled
-
setSupportFullScreenAndMaximized
public final void setSupportFullScreenAndMaximized(boolean supportFullScreenAndMaximized) Sets whether full-screen and maximized states should be persisted and restored.- Parameter:
supportFullScreenAndMaximized-trueto enable support
-