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
-
public class FlatMenuUI extends javax.swing.plaf.basic.BasicMenuUI
Provides the Flat LaF UI delegate forJMenu
.- 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.hoverBackground Color , MenuBar.underlineSelectionBackground Color, MenuBar.underlineSelectionColor Color, MenuBar.underlineSelectionHeight int
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FlatMenuUI.FlatMenuRenderer
-
Field Summary
-
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 Constructor Description FlatMenuUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.event.MouseInputListener
createMouseInputListener(javax.swing.JComponent c)
protected FlatMenuItemRenderer
createRenderer()
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent c)
java.awt.Dimension
getMinimumSize(javax.swing.JComponent c)
protected java.awt.Dimension
getPreferredMenuItemSize(javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, int defaultTextIconGap)
protected void
installDefaults()
void
paint(java.awt.Graphics g, javax.swing.JComponent c)
protected void
uninstallDefaults()
-
Methods inherited from class javax.swing.plaf.basic.BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createPropertyChangeListener, getMaximumSize, getPropertyPrefix, installKeyboardActions, installListeners, setupPostTimer, uninstallKeyboardActions, uninstallListeners
-
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
doClick, getPath, getPreferredSize, installComponents, installUI, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, update
-
-
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicMenuUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classjavax.swing.plaf.basic.BasicMenuUI
-
createRenderer
protected FlatMenuItemRenderer createRenderer()
-
createMouseInputListener
protected javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
- Overrides:
createMouseInputListener
in classjavax.swing.plaf.basic.BasicMenuUI
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSize
in classjavax.swing.plaf.basic.BasicMenuUI
-
getPreferredMenuItemSize
protected java.awt.Dimension getPreferredMenuItemSize(javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, int defaultTextIconGap)
- Overrides:
getPreferredMenuItemSize
in classjavax.swing.plaf.basic.BasicMenuItemUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
paint
in classjavax.swing.plaf.basic.BasicMenuItemUI
-
-