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 String
private MouseListener
private String
private MenuItemRenderer
private static final String
Fields inherited from class javax.swing.plaf.basic.BasicMenuUI
changeListener, menuListener
Fields 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 ComponentUI
private void
Checks if we have already detected the correct menu type, menu in menu bar vs.protected Dimension
getPreferredMenuItemSize
(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap) protected String
protected void
protected void
private static boolean
protected void
paintMenuItem
(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap) protected void
protected void
private void
Methods inherited from class javax.swing.plaf.basic.BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getMinimumSize, installKeyboardActions, setupPostTimer, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
doClick, getPath, getPreferredSize, installComponents, installUI, paint, paintBackground, paintText, uninstallComponents, uninstallUI, update
Methods 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:
installDefaults
in classBasicMenuUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicMenuUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefix
in classBasicMenuUI
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon aCheckIcon, Icon anArrowIcon, int textIconGap) - Overrides:
getPreferredMenuItemSize
in classBasicMenuItemUI
-
paintMenuItem
protected void paintMenuItem(Graphics g, JComponent c, Icon aCheckIcon, Icon anArrowIcon, Color background, Color foreground, int textIconGap) - Overrides:
paintMenuItem
in 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:
installListeners
in classBasicMenuUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicMenuUI
-
uninstallRolloverListener
private void uninstallRolloverListener() -
isSubMenu
-