java.lang.Object
com.dlsc.gemsfx.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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StageManager
Installs a new manager for the given stage.static StageManager
Installs a new manager for the given stage.static StageManager
install
(javafx.stage.Stage stage, Preferences preferences) Installs a new manager for the given stage.static StageManager
install
(javafx.stage.Stage stage, Preferences preferences, double minWidth, double minHeight) Installs a new manager for the given stage.final boolean
final void
setSupportFullScreenAndMaximized
(boolean supportFullScreenAndMaximized)
-
Method Details
-
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. -
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. -
install
public static StageManager install(javafx.stage.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.- Parameters:
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
-
install
public static StageManager install(javafx.stage.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 user preferences at the given path.- Parameters:
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
-
setSupportFullScreenAndMaximized
public final void setSupportFullScreenAndMaximized(boolean supportFullScreenAndMaximized) -
isSupportFullScreenAndMaximized
public final boolean isSupportFullScreenAndMaximized()
-