<AWT Dev> [9] Review request for 8177919: java.awt.Desktop.setDefaultMenuBar​() should be specified to throw IllegalStateException

Phil Race philip.race at oracle.com
Thu Apr 13 17:46:05 UTC 2017


28 import java.awt.*; Could this be just "import java.awt.Container;" ? 
Other than that this seems fine with the proviso that this has been 
tested with different L&Fs .. and even with none installed. -phil.



On 04/13/2017 10:38 AM, Alexander Zvegintsev wrote:
> Actually it does nothing on Windows and Linux.
>
> Please review another version of the fix,
>
> it enables default menubar regardless of apple.laf.useScreenMenuBar 
> property
>
> and restores an old default MenuBarUI when it is used in JFrame.
>
> http://cr.openjdk.java.net/~azvegint/jdk/9/8177919/01/
>
> Thanks,
> Alexander.
>
> On 11/04/2017 21:16, Phil Race wrote:
>> I'd like to understand the big picture here
>>
>> Q1. What does this Desktop API do on Windows and Linux ?
>>
>> Q2. If someone calls this API it is pretty clear what they want.
>>       Why do we require that they be running Aqua when a lot of the 
>> requests were
>>        specifically about de-coupling it from Aqua?
>>
>>       It is not apparent to me why they must learn about an 
>> undocumented option to get
>>       what they want. And the implNote is misleading (or wrong even) 
>> since there is a way
>>       to do it without Aqua. It is just not advertised.
>>
>>       And it is *even weirder* to add that note if Mac is the only 
>> platform that supports this ...
>>
>> -phil.
>>
>> On 04/11/2017 08:41 AM, Alexander Zvegintsev wrote:
>>> Hello,
>>>
>>> please review the fix
>>>
>>> http://cr.openjdk.java.net/~azvegint/jdk/9/8177919/00/
>>>
>>> for the issue
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8177919
>>>
>>> This fix removes throwing of ISE, this allows to use default menu 
>>> bar with LaF's other than Aqua (with apple.laf.useScreenMenuBar set 
>>> to true).
>>>
>>> This became possible after JDK-8166683[0] fix.
>>>
>>> Current documentation of Desktop.setDefaultMenuBar() has implnotes:
>>>
>>>      * @implNote Aqua Look and Feel should be active to support this 
>>> on Mac OS.
>>>
>>> I leave it unchanged, since I don't want to advertise the 
>>> apple.laf.useScreenMenuBar property.
>>>
>>> [0] https://bugs.openjdk.java.net/browse/JDK-8166683
>>>
>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20170413/b4d300d1/attachment.html>


More information about the awt-dev mailing list