Package com.jgoodies.looks.common
Class ExtBasicMenuItemUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
com.jgoodies.looks.common.ExtBasicMenuItemUI
- Direct Known Subclasses:
ExtBasicRadioButtonMenuItemUI
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.10 $
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler -
Field Summary
FieldsFields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MenuItemRenderercreateRenderer(JMenuItem menuItem, boolean iconBorderEnabled, Font acceleratorFont, Color selectionForeground, Color disabledForeground, Color acceleratorForeground, Color acceleratorSelectionForeground) static ComponentUIprotected DimensiongetPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap) protected booleanprotected voidprotected voidpaintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap) protected voidMethods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, createPropertyChangeListener, doClick, getMaximumSize, getMinimumSize, getPath, getPreferredSize, getPropertyPrefix, installComponents, installKeyboardActions, installListeners, installUI, paint, paintBackground, paintText, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
MINIMUM_WIDTH
private static final int MINIMUM_WIDTH- See Also:
-
renderer
-
-
Constructor Details
-
ExtBasicMenuItemUI
public ExtBasicMenuItemUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicMenuItemUI
-
iconBorderEnabled
protected boolean iconBorderEnabled() -
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicMenuItemUI
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap) - Overrides:
getPreferredMenuItemSizein classBasicMenuItemUI
-
paintMenuItem
protected void paintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap) - Overrides:
paintMenuItemin classBasicMenuItemUI
-
createRenderer
-