<Swing Dev> RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v2]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Sat Sep 4 11:09:21 UTC 2021


On Fri, 3 Sep 2021 05:54:45 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> I will like to know how because as it is pointed out, paintArrow delegates drawing to ImageIcon#paintIcon which is in shared code and this is mac specific issue so it needs to be handled before we call ImageIcon#paintIcon
>
> You need to override the paintIcon method in the InvertableImageIcon returned by the AquaImageFactory.getMenuArrowIcon() or you can create `class MenuArrowIcon extends InvertableImageIcon,` and override it there.
> 
> Also take a look to another usage of InvertableImageIcon for "MenuItemCheckIcon", should we disable it as well?

MenuItemCheckIcon disable-ness is also solved along with this fix.
JCheckBoxMenuItem component for MenuItemCheckIcon test is added additionally.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5310


More information about the swing-dev mailing list