507 |
br.height += insets.top + insets.bottom; |
br.height += insets.top + insets.bottom; |
508 |
|
|
509 |
// Menu item is considered to be highlighted when it is selected. |
// Menu item is considered to be highlighted when it is selected. |
510 |
if (m.isSelected() || m.getModel().isArmed() && |
// But we don't want to paint the background of JCheckBoxMenuItems |
511 |
|
if ((m.isSelected() && checkIcon == null) || m.getModel().isArmed() && |
512 |
(m.getParent() instanceof MenuElement)) |
(m.getParent() instanceof MenuElement)) |
513 |
{ |
{ |
514 |
if (m.isContentAreaFilled()) |
if (m.isContentAreaFilled()) |
606 |
if (menuItem.isEnabled()) |
if (menuItem.isEnabled()) |
607 |
{ |
{ |
608 |
// Menu item is considered to be highlighted when it is selected. |
// Menu item is considered to be highlighted when it is selected. |
609 |
if (menuItem.isSelected() || menuItem.getModel().isArmed() && |
// But not if it's a JCheckBoxMenuItem |
610 |
|
if ((menuItem.isSelected() && checkIcon == null) || menuItem.getModel().isArmed() && |
611 |
(menuItem.getParent() instanceof MenuElement)) |
(menuItem.getParent() instanceof MenuElement)) |
612 |
g.setColor(selectionForeground); |
g.setColor(selectionForeground); |
613 |
else |
else |