<Swing Dev> [10] RFR JDK-6461834: Minimize WindowsLookAndFeel classes included with Unix JDKs

Avik Niyogi avik.niyogi at oracle.com
Fri May 26 06:15:53 UTC 2017


+1

> On 24-May-2017, at 3:30 pm, swing-dev-request at openjdk.java.net wrote:
> 
> Date: Tue, 23 May 2017 14:29:16 +0530
> From: Prasanta Sadhukhan <prasanta.sadhukhan at oracle.com <mailto:prasanta.sadhukhan at oracle.com>>
> To: Phil Race <philip.race at oracle.com <mailto:philip.race at oracle.com>>, Magnus Ihse Bursie
> 	<magnus.ihse.bursie at oracle.com <mailto:magnus.ihse.bursie at oracle.com>>, build-dev at openjdk.java.net <mailto:build-dev at openjdk.java.net>,
> 	"swing-dev at openjdk.java.net <mailto:swing-dev at openjdk.java.net>" <swing-dev at openjdk.java.net <mailto:swing-dev at openjdk.java.net>>
> Subject: Re: <Swing Dev> [10] RFR JDK-6461834: Minimize
> 	WindowsLookAndFeel classes included with Unix JDKs
> Message-ID: <2f126747-6659-813a-f006-a6d5433912e2 at oracle.com <mailto:2f126747-6659-813a-f006-a6d5433912e2 at oracle.com>>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I got +1 from build. I need one more +1.
> 
> Any further comment/objection on this changeset? else Can I commit this?
> 
> Regards
> Prasanta
> On 5/18/2017 1:31 PM, Prasanta Sadhukhan wrote:
>> So far I have looked, it seems jdk.jconsole uses this classes for 
>> windows only. These classes are specified in
>> JConsole.java where it checks (for non-windows, it will come as 
>> GTKLookAndFeel)
>> 
>> String systemLaF = UIManager.getSystemLookAndFeelClassName();
>> if (systemLaF.equals("com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ||
>> systemLaF.equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) {
>> 
>> try {
>> UIManager.setLookAndFeel(systemLaF); MaximizableInternalFrame.java 
>> where it checks for this classes in windows only if (JConsole.IS_WIN) {
>> try {
>> Class<?> Part =
>> Class.forName("com.sun.java.swing.plaf.windows.TMSchema$Part"); and 
>> Utilities.java where it checks LookAndFeel laf = 
>> UIManager.getLookAndFeel();
>> boolean transparent = laf.getClass().getName().equals(windowsLaF);
>> 
>> Modified webrev
>> http://cr.openjdk.java.net/~psadhukhan/6461834/01/ <http://cr.openjdk.java.net/~psadhukhan/6461834/01/>
>> 
>> Regards
>> Prasanta
>> 
>> On 5/18/2017 12:36 AM, Phil Race wrote:
>>> The way to do this is to create a file
>>> src/java.desktop/windows/classes/module-info.java.extra
>>> 
>>> and move the opens there.
>>> 
>>> See for example
>>> src/java.base/windows/classes/module-info.java.extra
>>> 
>>> But are you sure jdk.jconsole needs these only on Windows ?
>>> Better make sure of it.
>>> 
>>> -phil.
>>> 
>>> On 05/17/2017 03:49 AM, Prasanta Sadhukhan wrote:
>>>> Yes, actually I am bit unsure of how to proceed with that. It is 
>>>> meant to open internal java.desktop classes "only" to jdk.jconsole 
>>>> but now afer this fix, these classes will only be available in 
>>>> windows platform, so it should be a conditional "open" and I am not 
>>>> sure if module-info.java allows conditional open.
>>>> 
>>>> Regards
>>>> Prasanta
>>>> On 5/17/2017 4:16 PM, Magnus Ihse Bursie wrote:
>>>>> Build changes looks good. However in 
>>>>> src/java.desktop/share/classes/module-info.java you are trying to 
>>>>> check in commented-out code instead of removing it.
>>>>> 
>>>>> /Magnus
>>>>> 
>>>>> On 2017-05-17 12:31, Prasanta Sadhukhan wrote:
>>>>>> Hi All,
>>>>>> 
>>>>>> Please review a fix for an issue whereby it is seen that 
>>>>>> WindowsLookAndFeel classes are built for non-windows platform,
>>>>>> where it is not needed.
>>>>>> Proposed fix is to remove building these classes for non-windows 
>>>>>> platform.
>>>>>> 
>>>>>> JPRT build is successful. Also, fixed the regression tests which 
>>>>>> expects this classes to be available in non-unix platform.
>>>>>> 
>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-6461834 <https://bugs.openjdk.java.net/browse/JDK-6461834>
>>>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/6461834/00/ <http://cr.openjdk.java.net/~psadhukhan/6461834/00/>
>>>>>> 
>>>>>> There are some closed regression test which will be taken care 
>>>>>> after this in a separate crucible review.
>>>>>> 
>>>>>> Regards
>>>>>> Prasanta
>>>>> 
>>>> 
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20170526/6eeca291/attachment.html>


More information about the swing-dev mailing list