Screen objects are relative to the Screen.primary.
For example:
Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
//set Stage boundaries to visible bounds of the main screen
stage.setX(primaryScreenBounds.getMinX());
stage.setY(primaryScreenBounds.getMinY());
stage.setWidth(primaryScreenBounds.getWidth());
stage.setHeight(primaryScreenBounds.getHeight());
stage.show();
| Modifier and Type | Field and Description |
|---|---|
| private static final ScreenConfigurationAccessor | |
| private Rectangle2D | bounds
The bounds of this |
| private static final AtomicBoolean | |
| private double | dpi
The resolution (dots per inch) of this |
| private float | outputScaleX
The recommended output scale factor of this |
| private float | outputScaleY
The recommended output scale factor of this |
| private static Screen | |
| private static final ObservableList | |
| private static final ObservableList | |
| private Rectangle2D | visualBounds
The visual bounds of this |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public boolean | Returns: true if this object is equal to the obj argument; false otherwise.the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Rectangle2D | |
| public final double | |
| public final double | Returns: the recommended output scale factor for the screen.Gets the recommended output scale factor of this |
| public final double | Returns: the recommended output scale factor for the screen.Gets the recommended output scale factor of this |
| public static Screen | |
| pack-priv static Screen | |
| public static ObservableList | Returns: observable list of currently available screensThe observable list of currently available |
| public static ObservableList | Returns: a ObservableList ofScreens for which Screen.bounds
intersects the provided rectanglethe x coordinate of the upper-left corner of the specified
rectangular area x, double the y coordinate of the upper-left corner of the specified
rectangular area y, double the width of the specified rectangular area width, double the height of the specified rectangular area height)Returns a ObservableList of |
| public static ObservableList | Returns: a ObservableList ofScreens for which Screen.bounds
intersects the provided rectangleThe specified r)Rectangle2DReturns a ObservableList of |
| public final Rectangle2D | |
| public int | Returns: a hash code for thisScreen object.Overrides java. Returns a hash code for this |
| private static Screen | |
| public String | Returns: a string representation of thisScreen object.Overrides java. Returns a string representation of this |
| private static void |
| accessor | back to summary |
|---|---|
| private static final ScreenConfigurationAccessor accessor | |
| bounds | back to summary |
|---|---|
| private Rectangle2D bounds The bounds of this | |
| configurationDirty | back to summary |
|---|---|
| private static final AtomicBoolean configurationDirty | |
| dpi | back to summary |
|---|---|
| private double dpi The resolution (dots per inch) of this | |
| outputScaleX | back to summary |
|---|---|
| private float outputScaleX The recommended output scale factor of this | |
| outputScaleY | back to summary |
|---|---|
| private float outputScaleY The recommended output scale factor of this | |
| primary | back to summary |
|---|---|
| private static Screen primary | |
| screens | back to summary |
|---|---|
| private static final ObservableList<Screen> screens | |
| unmodifiableScreens | back to summary |
|---|---|
| private static final ObservableList<Screen> unmodifiableScreens | |
| visualBounds | back to summary |
|---|---|
| private Rectangle2D visualBounds The visual bounds of this | |
| Screen | back to summary |
|---|---|
| private Screen() | |
| checkDirty | back to summary |
|---|---|
| private static void checkDirty() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Indicates whether some other object is "equal to" this one. | |
| getBounds | back to summary |
|---|---|
| public final Rectangle2D getBounds() Gets the bounds of this
| |
| getDpi | back to summary |
|---|---|
| public final double getDpi() Gets the resolution (dots per inch) of this
| |
| getOutputScaleX | back to summary |
|---|---|
| public final double getOutputScaleX() Gets the recommended output scale factor of this
| |
| getOutputScaleY | back to summary |
|---|---|
| public final double getOutputScaleY() Gets the recommended output scale factor of this
| |
| getPrimary | back to summary |
|---|---|
| public static Screen getPrimary() The primary
| |
| getScreenForNative | back to summary |
|---|---|
| pack-priv static Screen getScreenForNative(Object obj) | |
| getScreens | back to summary |
|---|---|
| public static ObservableList The observable list of currently available
| |
| getScreensForRectangle | back to summary |
|---|---|
| public static ObservableList Returns a ObservableList of
| |
| getScreensForRectangle | back to summary |
|---|---|
| public static ObservableList Returns a ObservableList of
| |
| getVisualBounds | back to summary |
|---|---|
| public final Rectangle2D getVisualBounds() Gets the visual bounds of this
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for this
| |
| nativeToScreen | back to summary |
|---|---|
| private static Screen nativeToScreen(Object obj, Screen screen) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| updateConfiguration | back to summary |
|---|---|
| private static void updateConfiguration() | |