com.jgoodies.looks.common
Class MenuItemRenderer

java.lang.Object
  extended by com.jgoodies.looks.common.MenuItemRenderer

public class MenuItemRenderer
extends Object

Renders and lays out menu items.

Version:
$Revision: 1.7 $
Author:
Karsten Lentzsch

Field Summary
protected static String HTML_KEY
           
 
Constructor Summary
MenuItemRenderer(JMenuItem menuItem, boolean iconBorderEnabled, Font acceleratorFont, Color selectionForeground, Color disabledForeground, Color acceleratorForeground, Color acceleratorSelectionForeground)
          Constructs a MenuItemRenderer for the specified menu item and settings.
 
Method Summary
protected  boolean disabledTextHasShadow()
           
 Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
           
protected  boolean isMnemonicHidden()
           
 void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_KEY

protected static final String HTML_KEY
See Also:
Constant Field Values
Constructor Detail

MenuItemRenderer

public MenuItemRenderer(JMenuItem menuItem,
                        boolean iconBorderEnabled,
                        Font acceleratorFont,
                        Color selectionForeground,
                        Color disabledForeground,
                        Color acceleratorForeground,
                        Color acceleratorSelectionForeground)
Constructs a MenuItemRenderer for the specified menu item and settings.

Method Detail

getPreferredMenuItemSize

public Dimension getPreferredMenuItemSize(JComponent c,
                                          Icon checkIcon,
                                          Icon arrowIcon,
                                          int defaultTextIconGap)

paintMenuItem

public void paintMenuItem(Graphics g,
                          JComponent c,
                          Icon checkIcon,
                          Icon arrowIcon,
                          Color background,
                          Color foreground,
                          int defaultTextIconGap)

isMnemonicHidden

protected boolean isMnemonicHidden()

disabledTextHasShadow

protected boolean disabledTextHasShadow()


Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.