Release Note: GraphicsEnvironment.getCenterPoint() and getMaximumWindowBounds() are Unified Across Platforms

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 13
    • Affects Version/s: 13
    • Component/s: client-libs
    • 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.

            Assignee:
            Sergey Bylokhov
            Reporter:
            Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: