uic.themes
Class UICMenuItemUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
uic.themes.UICMenuItemUI
- public class UICMenuItemUI
- extends BasicMenuItemUI
- Since:
- 1.1
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI |
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground |
Method Summary |
static ComponentUI |
createUI(JComponent c)
|
protected Icon |
getDummyIcon()
|
protected Dimension |
getPreferredMenuItemSize(JComponent c,
Icon checkIcon,
Icon arrowIcon,
int defaultTextIconGap)
Override to make sure there is an icon |
protected boolean |
iconRequired(JMenuItem mi)
Returns true when there is at least one menu item with an icon in the current menu |
void |
paint(Graphics g,
JComponent c)
|
protected void |
paintMenuItem(Graphics g,
JComponent c,
Icon checkIcon,
Icon arrowIcon,
Color background,
Color foreground,
int defaultTextIconGap)
Override to make text of menu items aligned when there are menu items with and without icons in one menu |
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI |
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, doClick, getMaximumSize, getMinimumSize, getPath, getPreferredSize, getPropertyPrefix, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, paintBackground, paintText, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UICMenuItemUI
public UICMenuItemUI()
createUI
public static ComponentUI createUI(JComponent c)
paintMenuItem
protected void paintMenuItem(Graphics g,
JComponent c,
Icon checkIcon,
Icon arrowIcon,
Color background,
Color foreground,
int defaultTextIconGap)
- Override to make text of menu items aligned when there are menu items with and without icons in one menu
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c,
Icon checkIcon,
Icon arrowIcon,
int defaultTextIconGap)
- Override to make sure there is an icon
iconRequired
protected boolean iconRequired(JMenuItem mi)
- Returns true when there is at least one menu item with an icon in the current menu
getDummyIcon
protected Icon getDummyIcon()
paint
public void paint(Graphics g,
JComponent c)
Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence