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

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • 13
    • 13
    • 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.

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

              Created:
              Updated:
              Resolved: