Module is.codion.swing.common.ui
Interface MenuItemBuilder<B extends MenuItemBuilder<B>>
- All Superinterfaces:
ButtonBuilder<JMenuItem,,Void, B> ComponentBuilder<JMenuItem,,B> ComponentValueBuilder<JMenuItem,,Void, B> Supplier<JMenuItem>
public interface MenuItemBuilder<B extends MenuItemBuilder<B>>
extends ButtonBuilder<JMenuItem,Void,B>
Builds a JMenuItem.
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
COMPONENT_VALUE -
Method Summary
Modifier and TypeMethodDescriptionaccelerator(@Nullable KeyStroke accelerator) Sets the accelerator displayed by the menu item, in place of any accelerator of its action.static <B extends MenuItemBuilder<B>>
MenuItemBuilder<B> builder()Methods inherited from interface is.codion.swing.common.ui.component.button.ButtonBuilder
action, actionListener, borderPainted, buttonGroup, contentAreaFilled, control, control, disabledIcon, disabledSelectedIcon, focusPainted, horizontalAlignment, horizontalTextPosition, icon, iconTextGap, includeText, margin, mnemonic, multiClickThreshold, pressedIcon, rolloverEnabled, rolloverIcon, rolloverSelectedIcon, selected, selectedIcon, text, verticalAlignment, verticalTextPositionMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
ancestorListener, background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, get, hierarchyListener, keyEvent, keyListener, label, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupControl, popupControls, popupControls, popupMenu, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visibleMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
buildValue, buildValue, changeConsumer, changeListener, consumer, link, link, listener, modified, modifiedIndicator, onBuildValue, valid, valid, validationIndicator, validator, value, warned, weakChangeConsumer, weakChangeListener, weakConsumer, weakListener, when, when, when, when
-
Method Details
-
accelerator
Sets the accelerator displayed by the menu item, in place of any accelerator of its action.Note that Swing binds the accelerator as well, in the window of a menu bar containing the menu item, and while a popup menu containing it is showing.
- Parameters:
accelerator- the accelerator, null for the one of the action, if any- Returns:
- this builder instance
- See Also:
-
builder
- Type Parameters:
B- the builder type- Returns:
- a builder for a JMenuItem
-