Package com.jgoodies.looks.common
Class ExtBasicMenuUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
javax.swing.plaf.basic.BasicMenuUI
com.jgoodies.looks.common.ExtBasicMenuUI
- Direct Known Subclasses:
PlasticMenuUI
An implementation of
MenuUI used by the JGoodies Windows
and Plastic looks. Unlike it's superclass, it aligns submenu items.- Version:
- $Revision: 1.12 $
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuUI
BasicMenuUI.ChangeHandler, BasicMenuUI.MouseInputHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate MouseListenerprivate Stringprivate MenuItemRendererprivate static final StringFields inherited from class javax.swing.plaf.basic.BasicMenuUI
changeListener, menuListenerFields 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 TypeMethodDescriptionstatic ComponentUIprivate voidChecks if we have already detected the correct menu type, menu in menu bar vs.protected DimensiongetPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap) protected Stringprotected voidprotected voidprivate static booleanprotected voidpaintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap) protected voidprotected voidprivate voidMethods inherited from class javax.swing.plaf.basic.BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getMinimumSize, installKeyboardActions, setupPostTimer, uninstallKeyboardActionsMethods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
doClick, getPath, getPreferredSize, installComponents, installUI, paint, paintBackground, paintText, uninstallComponents, uninstallUI, updateMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
MENU_PROPERTY_PREFIX
- See Also:
-
SUBMENU_PROPERTY_PREFIX
- See Also:
-
propertyPrefix
-
renderer
-
mouseListener
-
-
Constructor Details
-
ExtBasicMenuUI
public ExtBasicMenuUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicMenuUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicMenuUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefixin classBasicMenuUI
-
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
-
ensureSubMenuInstalled
private void ensureSubMenuInstalled()Checks if we have already detected the correct menu type, menu in menu bar vs. sub menu; reinstalls if necessary. -
installListeners
protected void installListeners()- Overrides:
installListenersin classBasicMenuUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicMenuUI
-
uninstallRolloverListener
private void uninstallRolloverListener() -
isSubMenu
-