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

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

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • client-libs
    • None
    • behavioral
    • minimal
    • Minimal risk as these are client properties never before used and their names are apple and AWT specific.
    • Other
    • JDK

      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")

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

              Created:
              Updated: