AquaLaf setting?

Alexander Potochkin Alexander.Potochkin at oracle.com
Fri Oct 28 05:26:10 PDT 2011


Hello Kevin
> The Aqua LaF is chosen by javax.swing.UIManager.getSystemLookAndFeelClassName() if the OSType is MACOSX and the current toolkit is LWCToolkit (otherwise, we use Metal).

I can see it now

So you've changed the UIManager class to support it,
I checked that we don't have that check in UIManager from official 
Oracale JDK

We'll have to merge it somehow

Do you know any other places where MacOS JDK shared code is different 
from Oracle JDK?

Thanks
alexp

>> UIManager spec tells the following:
>>
>> * The class used for the default look and feel is chosen in the following
>> * manner:
>> *<li>If the system property<code>swing.defaultlaf</code>  is
>> *       {@code non-null}, use its value as the default look and feel class
>> *       name.
>> *<li>If the {@link java.util.Properties} file<code>swing.properties</code>
>> *       exists and contains the key<code>swing.defaultlaf</code>,
>> *       use its value as the default look and feel class name.
>> *<li>Otherwise use the cross platform look and feel.
>>
>> So if you don't use the property file by default, you should be setting swing.defaultlaf somewhere.
> The swing.defaultlaf property is set (for MACOSX only) in javax.swing.UIManager.loadSwingProperties().  It will be overridden if the user specifies a default LaF at the command line.
>
>> I wonder what piece of code is responsible for setting system properties like this one
>>
>> Thanks much
>> alexp
>>
>>>> Is it read from some property file?
>>>> (Didn't find swing.properties)
>>>>
>>> We don't have a swing.properties file by default.  If the user creates the swing.properties file and specifies a different default LaF, we honor their choice.
>>>
>>>> Thanks
>>>> alexp
>>> -Kevin



More information about the macosx-port-dev mailing list