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.
  • Method Details

    • accelerator

      B accelerator(@Nullable KeyStroke 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

      static <B extends MenuItemBuilder<B>> MenuItemBuilder<B> builder()
      Type Parameters:
      B - the builder type
      Returns:
      a builder for a JMenuItem