<Swing Dev> Review Request JDK-6897701 : In Nimbus Disabled Menus and Menu Items don't look disabled

Semyon Sadetsky semyon.sadetsky at oracle.com
Wed Mar 30 17:00:22 UTC 2016


Hi Prem,

In the block above the line you've changed:

  764         if ((context.getComponentState() & 
SynthConstants.DISABLED) != 0) {
  765             //This component is disabled, so return the disabled 
color.
  766             //In some cases this means ignoring the color 
specified by the
  767             //developer on the component. In other cases it means 
using a
  768             //specified disabledTextColor, such as on JTextComponents.
  769             //For example, JLabel doesn't specify a disabled color 
that the
  770             //developer can set, yet it should have a disabled 
color to the
  771             //text when the label is disabled. This code allows 
for that.

does not it solve the similar problem? Maybe it would be just better to 
add JMenu and JMenuItem case in it?

I'm just not sure that the condition (state == SynthConstants.ENABLED) 
will work if the menu item is a radio or a checkbox because the may have 
SynthConstants.SELECTED flag as well. Will this work for selected radio 
& checkbox?

--Semyon

On 3/30/2016 3:02 PM, Prem Balakrishnan wrote:
>
> Hi*,*
>
> Please review fix for JDK9,
>
> *Bug:*https://bugs.openjdk.java.net/browse/JDK-6897701
>
> *Webrev:*http://cr.openjdk.java.net/~arapte/prem/6897701/webrev.00/ 
> <http://cr.openjdk.java.net/%7Earapte/prem/6897701/webrev.00/>
>
> *Issue:*
>
> In Nimbus Disabled Menus and Menu Items don't look disabled
>
> *Cause:*
>
> For JMenu and JMenuItem, Developer specified TEXT_FOREGROUND color was 
> set even when they were Disabled.
>
> (Instead of setting Color for the State)
>
> *Fix:*
>
> When JMenu and JMenuItem is disabled, Color for the State is used.
>
> *Test: *Manual Test(since visual validation is required)**
>
> Regards,
> Prem
>

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


More information about the swing-dev mailing list