<Swing Dev> [15] RFR JDK-8216329: Cannot resize CheckBoxItemMenu in Synth L&F with setHorizontalTextPosition
Pankaj Bansal
pankaj.b.bansal at oracle.com
Mon Jan 27 06:33:45 UTC 2020
Hello Sergey,
<< The updateCheckIcon() was a private method in the public class from the javax.swing.plaf.basic package you cannot simply make it protected.
The updateCheckIcon function was made from installDefaults function while fixing [1], so that it can be called from multiple places [2]. installDefaults is a protected function only, so I have not exposed any code which was not exposed earlier. So I think it should not be an issue to do this.
<< Can you please provide some more details why the call to updateCheckIcon() break the resize?
In the fix, we are not reinstalling the full UI, but are changing it partially. If we reinstall it fully as done in first iteration of review for [1], this works fine[3].
[1] https://bugs.openjdk.java.net/browse/JDK-8152981
[2] http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/5fb24aaf6945
[3] http://cr.openjdk.java.net/~rchamyal/8152981/webrev.00/
Regards,
Pankaj
-----Original Message-----
From: Sergey Bylokhov
Sent: Friday, January 24, 2020 5:55 AM
To: Pankaj Bansal; swing-dev at openjdk.java.net
Subject: Re: <Swing Dev> [15] RFR JDK-8216329: Cannot resize CheckBoxItemMenu in Synth L&F with setHorizontalTextPosition
Hi, Pankaj.
The updateCheckIcon() was a private method in the public class from the javax.swing.plaf.basic package you cannot simply make it protected.
Can you please provide some more details why the call to updateCheckIcon() break the resize?
On 1/23/20 3:05 am, Pankaj Bansal wrote:
> Hi All,
>
> Please review the following fix for jdk15.
>
>
> Bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8216329
>
> webrev:
>
> http://cr.openjdk.java.net/~pbansal/8216329/webrev00/
>
> Issue:
>
> The JCheckBoxMenuItem is not being resized properly when setHorizontalTextPosition is called on it. This results in some text getting truncated from the end. The issue is specific to Synth L&F.
>
> Cause:
>
> The present bug is a regression of [1].
>
> Fix:
>
> The problem in [1] was specific to Windows L&F. but the fix was done in BasicMenuItemUI which is shared by all the L&F. The current fix moves the fix done for [1] to Windows L&F specific code. This fixes the current issue. I have run the tests that was added for [1]. All works fine.
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8152981
>
>
> Regards,
> Pankaj Bansal
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list