Package com.formdev.flatlaf.ui
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 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 void
applyStyle
(Object style) protected Object
applyStyleProperty
(String key, Object value) (package private) static Object
applyStyleProperty
(JMenuItem menuItem, BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key, Object value) protected PropertyChangeListener
protected FlatMenuItemRenderer
static ComponentUI
protected Dimension
getPreferredMenuItemSize
(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) getStyleableInfos
(BasicMenuItemUI ui, FlatMenuItemRenderer renderer) getStyleableValue
(JComponent c, String key) (package private) static Object
getStyleableValue
(BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key) protected void
protected void
void
void
paint
(Graphics g, JComponent c) protected void
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, doClick, getMaximumSize, getMinimumSize, getPath, getPreferredSize, getPropertyPrefix, installComponents, installKeyboardActions, installListeners, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI, update
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
renderer
-
oldStyleValues
-
-
Constructor Details
-
FlatMenuItemUI
public FlatMenuItemUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicMenuItemUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicMenuItemUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicMenuItemUI
-
createRenderer
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListener
in classBasicMenuItemUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
applyStyleProperty
static Object applyStyleProperty(JMenuItem menuItem, BasicMenuItemUI ui, FlatMenuItemRenderer renderer, String key, Object value) -
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableInfos
-
getStyleableValue
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getStyleableValue
-
getLookupForStyling
- Specified by:
getLookupForStyling
in interfaceFlatStylingSupport.StyleableLookupProvider
- Since:
- 2.5
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) - Overrides:
getPreferredMenuItemSize
in classBasicMenuItemUI
-
paint
- Overrides:
paint
in classBasicMenuItemUI
-