com.jgoodies.looks.common

Class MenuItemRenderer


public class MenuItemRenderer
extends java.lang.Object

Renders and lays out menu items.
Version:
$Revision: 1.11 $
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)

Field Details

HTML_KEY

protected static final String HTML_KEY

Constructor Details

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 Details

disabledTextHasShadow

protected boolean disabledTextHasShadow()

getPreferredMenuItemSize

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

isMnemonicHidden

protected boolean isMnemonicHidden()

paintMenuItem

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

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