com.jgoodies.looks.common

Class ExtBasicMenuItemUI

public class ExtBasicMenuItemUI extends BasicMenuItemUI

An implementation of MenuItemUI used by the JGoodies Windows and Plastic looks. Unlike it's superclass it aligns menu items, uses a slightly smaller gap between text and icon, which you can override in the UI defaults.

Version: $Revision: 1.6 $

Author: Karsten Lentzsch

Method Summary
protected MenuItemRenderercreateRenderer(JMenuItem menuItem, boolean iconBorderEnabled, Font acceleratorFont, Color selectionForeground, Color disabledForeground, Color acceleratorForeground, Color acceleratorSelectionForeground)
static ComponentUIcreateUI(JComponent b)
protected DimensiongetPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap)
protected booleaniconBorderEnabled()
protected voidinstallDefaults()
protected voidpaintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap)
protected voiduninstallDefaults()

Method Detail

createRenderer

protected MenuItemRenderer createRenderer(JMenuItem menuItem, boolean iconBorderEnabled, Font acceleratorFont, Color selectionForeground, Color disabledForeground, Color acceleratorForeground, Color acceleratorSelectionForeground)

createUI

public static ComponentUI createUI(JComponent b)

getPreferredMenuItemSize

protected Dimension getPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap)

iconBorderEnabled

protected boolean iconBorderEnabled()

installDefaults

protected void installDefaults()

paintMenuItem

protected void paintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap)

uninstallDefaults

protected void uninstallDefaults()
Copyright © 2001-2008 JGoodies Karsten Lentzsch. All Rights Reserved.