Class MenuBarControlSupport<B,MB,M>

java.lang.Object
it.tidalwave.ui.core.spi.MenuBarControlSupport<B,MB,M>
Type Parameters:
B - the type of the binder
MB - the type of the menubar
M - the type of the menu
All Implemented Interfaces:
MenuBarControl<B,MB>

public abstract class MenuBarControlSupport<B,MB,M> extends Object implements MenuBarControl<B,MB>
A support implementation for MenuBarControl.
Since:
1.1-ALPHA-6
Author:
Fabrizio Giudici
  • Field Details

  • Constructor Details

    • MenuBarControlSupport

      protected MenuBarControlSupport()
      Default constructor.
  • Method Details

    • populate

      public void populate(@Nonnull B binder, @Nonnull MB menuBar)
      Populates the menu bar with menus.
      Specified by:
      populate in interface MenuBarControl<B,MB>
      Parameters:
      binder - the binder
      menuBar - the menu bar
    • createMenu

      @Nonnull protected abstract M createMenu(@Nonnull String label)
      Returns a new menu with the given label..
      Parameters:
      label - the label
      Returns:
      a new menu with the given label
    • addMenuToMenuBar

      protected abstract void addMenuToMenuBar(@Nonnull MB menuBar, @Nonnull M menu)
      Adds a menu to the menu bar.
      Parameters:
      menuBar - the menu bar
      menu - the menu
    • addMenuItemToMenu

      protected abstract void addMenuItemToMenu(@Nonnull M menu, @Nonnull B binder, @Nonnull UserAction action)
      Adds to the given menu a new item bound to the given UserAction.
      Parameters:
      menu - the menu
      binder - the binder
      action - the user action