Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8265447

Introduce the new client property for mac: apple.awt.windowAppearance

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Draft
    • Priority: P4
    • Resolution: Unresolved
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Minimal risk as these are client properties never before used and their names are apple and AWT specific.
    • Interface Kind:
      Other
    • Scope:
      JDK

      Description

      Summary

      Control window appearance by a new client property in AWT on macOS.

      Problem

      Rich client applications (IntelliJ IDEA for example) need control over window appearance to align decorations with the application themes. Please note, the existing JVM option "apple.awt.application.appearance" does not cover the need for dynamic changing of the window appearance.

      Solution

      Extend the macOS AWT by a string client property corresponding to the attribute "appearance" of native windows. The new client property is applied to the root panes of windows.

      Specification

      The new property follows the format of some existing properties (See CPlatformWindow.java for a complete list):

      "apple.awt.windowAppearance"

      The string property can be initialized by any name of the existing appearance supported by macOS. Here is the list https://developer.apple.com/documentation/appkit/nsappearancename?language=objc

      For example:

      rootPane.putClientProperty("apple.awt.windowAppearance", "NSAppearanceNameVibrantDark")

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              avu Alexey Ushakov
              Reporter:
              avu Alexey Ushakov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: