|
|
@ -38,6 +38,7 @@ public class DarkMenuUI extends BasicMenuUI implements MenuItemUI { |
|
|
|
protected int acceleratorTextOffset; |
|
|
|
protected int acceleratorTextOffset; |
|
|
|
protected boolean useEvenHeight; |
|
|
|
protected boolean useEvenHeight; |
|
|
|
protected Icon arrowIconHover; |
|
|
|
protected Icon arrowIconHover; |
|
|
|
|
|
|
|
protected Icon arrowIconDisabled; |
|
|
|
protected JMenu menu; |
|
|
|
protected JMenu menu; |
|
|
|
protected MouseListener mouseListener; |
|
|
|
protected MouseListener mouseListener; |
|
|
|
|
|
|
|
|
|
|
@ -107,6 +108,7 @@ public class DarkMenuUI extends BasicMenuUI implements MenuItemUI { |
|
|
|
acceleratorForeground = UIManager.getColor("Menu.foreground"); |
|
|
|
acceleratorForeground = UIManager.getColor("Menu.foreground"); |
|
|
|
acceleratorSelectionForeground = UIManager.getColor("Menu.selectionForeground"); |
|
|
|
acceleratorSelectionForeground = UIManager.getColor("Menu.selectionForeground"); |
|
|
|
arrowIconHover = UIManager.getIcon("Menu.arrowHover.icon"); |
|
|
|
arrowIconHover = UIManager.getIcon("Menu.arrowHover.icon"); |
|
|
|
|
|
|
|
arrowIconDisabled = UIManager.getIcon("Menu.arrowDisabled.icon"); |
|
|
|
useEvenHeight = !Boolean.TRUE.equals(UIManager.get(getPropertyPrefix() + ".evenHeight")); |
|
|
|
useEvenHeight = !Boolean.TRUE.equals(UIManager.get(getPropertyPrefix() + ".evenHeight")); |
|
|
|
acceleratorTextOffset = UIManager.getInt(getPropertyPrefix() + ".acceleratorTextOffset"); |
|
|
|
acceleratorTextOffset = UIManager.getInt(getPropertyPrefix() + ".acceleratorTextOffset"); |
|
|
|
} |
|
|
|
} |
|
|
@ -123,6 +125,8 @@ public class DarkMenuUI extends BasicMenuUI implements MenuItemUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Icon getArrowIcon() { |
|
|
|
protected Icon getArrowIcon() { |
|
|
|
|
|
|
|
if (!menuItem.isEnabled()) |
|
|
|
|
|
|
|
return arrowIconDisabled; |
|
|
|
boolean hover = |
|
|
|
boolean hover = |
|
|
|
menuItem.getModel().isArmed() || (menuItem instanceof JMenu && menuItem.getModel().isSelected()); |
|
|
|
menuItem.getModel().isArmed() || (menuItem instanceof JMenu && menuItem.getModel().isSelected()); |
|
|
|
return hover ? arrowIconHover : arrowIcon; |
|
|
|
return hover ? arrowIconHover : arrowIcon; |
|
|
|