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