Class FlatMenuItemUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
com.formdev.flatlaf.ui.FlatMenuItemUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableLookupProvider, FlatStylingSupport.StyleableUI
public class FlatMenuItemUI
extends BasicMenuItemUI
implements FlatStylingSupport.StyleableUI, FlatStylingSupport.StyleableLookupProvider
Provides the Flat LaF UI delegate for
JMenuItem.
-
Nested Class Summary
Nested classes/interfaces inherited from class BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler -
Field Summary
FieldsFields 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) (package private) static ObjectapplyStyleProperty(JMenuItem menuItem, BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key, Object value) protected PropertyChangeListenerprotected FlatMenuItemRendererstatic ComponentUIprotected DimensiongetPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) getStyleableInfos(BasicMenuItemUI ui, FlatMenuItemRenderer renderer) getStyleableValue(JComponent c, String key) (package private) static ObjectgetStyleableValue(BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key) protected voidinstallComponents(JMenuItem menuItem) protected voidprotected voidvoidvoidpaint(Graphics g, JComponent c) protected voidMethods inherited from class BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, doClick, getMaximumSize, getMinimumSize, getPath, getPreferredSize, getPropertyPrefix, installKeyboardActions, installListeners, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
renderer
-
oldStyleValues
-
-
Constructor Details
-
FlatMenuItemUI
public FlatMenuItemUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicMenuItemUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicMenuItemUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicMenuItemUI
-
installComponents
- Overrides:
installComponentsin classBasicMenuItemUI
-
createRenderer
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicMenuItemUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
-
applyStyleProperty
static Object applyStyleProperty(JMenuItem menuItem, BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key, Object value) -
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableInfos
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getStyleableValue
-
getLookupForStyling
- Specified by:
getLookupForStylingin interfaceFlatStylingSupport.StyleableLookupProvider- Since:
- 2.5
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) - Overrides:
getPreferredMenuItemSizein classBasicMenuItemUI
-
paint
- Overrides:
paintin classBasicMenuItemUI
-