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

[macosx] Support NSTexturedBackgroundWindowMask/different titlebar styles to create unified toolbar

XMLWordPrintable

    • b49
    • generic
    • os_x

        http://java.net/jira/browse/MACOSX_PORT-764 submitted 2011/12/02 by Hendrik Schreiber
        For probably more than half a decade most attractive native applications on OS X have been using the unified toolbar look available through the NSWindow style NSTexturedBackgroundWindowMask. Because the title bar of Windows (e.g. JFrame) is painted by AWT/Swing, it is very hard for developers to achieve this look.
        Java 6 SE for OS X honored the property <span class=&quot;nobr&quot;><a href=&quot;http://developer.apple.com/library/mac/#technotes/tn2007/tn2196.html#APPLE_AWT_BRUSHMETALLOOK&quot;&gt;http://developer.apple.com/library/mac/#technotes/tn2007/tn2196.html#APPLE_AWT_BRUSHMETALLOOK&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/jira/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/></sup></a></span> and essentially rendered the desired background and titlebar. Unfortunately, its implementation is apparently less than perfect (see <span class=&quot;nobr&quot;><a href=&quot;http://lists.apple.com/archives/java-dev/2011/Nov/msg00033.html&quot;&gt;http://lists.apple.com/archives/java-dev/2011/Nov/msg00033.html&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/jira/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/></sup></a></span>).
        To compete with native applications on OS X, Java applications have to be able to emulate their looks. This is impossible without the unified toolbar. The biggest obstacle to implementing a unified toolbar is the titlebar style - by default it has a thin line at the bottom. There should be a way to switch this to another style that does not have that line and can be connected seamlessly to an adjacent toolbar.
        Since most Mac user's value an appealing (if not sexy) UI, for all of us who try to ship commercial software for OS X based on Java, this is a showstopper for adopting OpenJDK.
        Additionally, but this is not as important, it would be nice, if there was a way to specify a style for JPanels that filled them with the system's native pattern (gray gradient for Snow Leopard, gradient with noise for Lion).

              serb Sergey Bylokhov
              vasya Vassili Igouchkine (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: