uic.themes
Class UICMenuItemUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byjavax.swing.plaf.ButtonUI
          extended byjavax.swing.plaf.MenuItemUI
              extended byjavax.swing.plaf.basic.BasicMenuItemUI
                  extended byuic.themes.UICMenuItemUI

public class UICMenuItemUI
extends BasicMenuItemUI

Since:
1.1

Nested Class Summary
 
Nested classes inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
 
Constructor Summary
UICMenuItemUI()
           
 
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 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UICMenuItemUI

public UICMenuItemUI()
Method Detail

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