Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214918 Unify GraphicsEnvironment.getCenterPoint()/getMaximumWindowBounds() across the platforms
  3. JDK-8218009

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

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: client-libs
    • Labels:
    • Verification:
      Verified

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: