-
Sub-task
-
Resolution: Delivered
-
P4
-
13
-
Verified
Two methods were added to the `GraphicsEnvironment` class in JDK 1.4:
- `getCenterPoint()`
- `getMaximumWindowBounds()`
See [https://docs.oracle.com/javase/7/docs/technotes/guides/awt/1.4/AWTChanges.html#windowCentering](https://docs.oracle.com/javase/7/docs/technotes/guides/awt/1.4/AWTChanges.html#windowCentering).
The page in the preceding link includes the following description:
"X-Window, Xinerama
All monitors share a single virtual coordinate space, as on Microsoft Windows. However, it is possible for the user to specify through X resources where windows should be centered. If these resources are set, `getCenterPoint` reflects their value. Otherwise, it returns the point at the center of the virtual coordinate space. (In practice, this will almost always be set - CDE sets it by default.)"
Now, in JDK 13, the implementation of `getCenterPoint()` and `getMaximumWindowBounds()` has been unified across the platforms (Windows, Linux, Solaris, and macOS):
- `getCenterPoint` returns the coordinates of the center of the primary display, for all platforms.
- `getMaximumWindowBounds` returns the bounds of the primary display minus display insets, for all platforms.
- `getCenterPoint()`
- `getMaximumWindowBounds()`
See [https://docs.oracle.com/javase/7/docs/technotes/guides/awt/1.4/AWTChanges.html#windowCentering](https://docs.oracle.com/javase/7/docs/technotes/guides/awt/1.4/AWTChanges.html#windowCentering).
The page in the preceding link includes the following description:
"X-Window, Xinerama
All monitors share a single virtual coordinate space, as on Microsoft Windows. However, it is possible for the user to specify through X resources where windows should be centered. If these resources are set, `getCenterPoint` reflects their value. Otherwise, it returns the point at the center of the virtual coordinate space. (In practice, this will almost always be set - CDE sets it by default.)"
Now, in JDK 13, the implementation of `getCenterPoint()` and `getMaximumWindowBounds()` has been unified across the platforms (Windows, Linux, Solaris, and macOS):
- `getCenterPoint` returns the coordinates of the center of the primary display, for all platforms.
- `getMaximumWindowBounds` returns the bounds of the primary display minus display insets, for all platforms.