Class FlatMenuUI
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.formdev.flatlaf.ui.FlatMenuUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableLookupProvider, FlatStylingSupport.StyleableUI
public class FlatMenuUI
extends BasicMenuUI
implements FlatStylingSupport.StyleableUI, FlatStylingSupport.StyleableLookupProvider
Provides the Flat LaF UI delegate for
JMenu.
- UiDefault:
- Menu.font Font, Menu.background Color, Menu.foreground Color, Menu.disabledForeground Color, Menu.selectionBackground Color, Menu.selectionForeground Color, Menu.acceleratorForeground Color, Menu.acceleratorSelectionForeground Color, MenuItem.acceleratorFont Font defaults to MenuItem.font, MenuItem.acceleratorDelimiter String, Menu.border Border, Menu.borderPainted boolean, Menu.margin Insets, Menu.arrowIcon Icon, Menu.checkIcon Icon, Menu.opaque boolean, Menu.crossMenuMnemonic boolean default is false, Menu.useMenuBarBackgroundForTopLevel boolean default is false, MenuBar.background Color used if Menu.useMenuBarBackgroundForTopLevel is true , MenuItem.iconTextGap int , MenuBar.selectionInsets Insets, MenuBar.selectionEmbeddedInsets Insets, MenuBar.selectionArc int, MenuBar.hoverBackground Color, MenuBar.selectionBackground Color optional; defaults to Menu.selectionBackground, MenuBar.selectionForeground Color optional; defaults to Menu.selectionForeground, MenuBar.underlineSelectionBackground Color, MenuBar.underlineSelectionColor Color, MenuBar.underlineSelectionHeight int
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class BasicMenuUI
BasicMenuUI.ChangeHandler, BasicMenuUI.MouseInputHandler -
Field Summary
Fields inherited from class BasicMenuUI
changeListener, menuListenerFields inherited from class 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 voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) protected MouseInputListenerprotected PropertyChangeListenerprotected FlatMenuItemRendererstatic ComponentUIprotected DimensiongetPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) getStyleableValue(JComponent c, String key) protected voidinstallComponents(JMenuItem menuItem) protected voidprotected voidvoidvoidpaint(Graphics g, JComponent c) protected voidMethods inherited from class BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, getMaximumSize, getPropertyPrefix, installKeyboardActions, installListeners, setupPostTimer, uninstallKeyboardActions, uninstallListenersMethods inherited from class BasicMenuItemUI
doClick, getPath, getPreferredSize, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, updateMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Constructor Details
-
FlatMenuUI
public FlatMenuUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicMenuItemUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicMenuUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicMenuUI
-
installComponents
- Overrides:
installComponentsin classBasicMenuItemUI
-
createRenderer
-
createMouseInputListener
- Overrides:
createMouseInputListenerin classBasicMenuUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicMenuUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getLookupForStyling
- Specified by:
getLookupForStylingin interfaceFlatStylingSupport.StyleableLookupProvider- Since:
- 2.5
-
getMinimumSize
- Overrides:
getMinimumSizein classBasicMenuUI
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) - Overrides:
getPreferredMenuItemSizein classBasicMenuItemUI
-
paint
- Overrides:
paintin classBasicMenuItemUI
-