Class ToolBarControlSupport<B,T,BT>

java.lang.Object
it.tidalwave.ui.core.spi.ToolBarControlSupport<B,T,BT>
Type Parameters:
B - the concrete type of the binder
T - the concrete type of the toolbar
BT - the concrete type of the button
All Implemented Interfaces:
ToolBarControl<B,T>

public abstract class ToolBarControlSupport<B,T,BT> extends Object implements ToolBarControl<B,T>
A support implementation for ToolBarControl.
Since:
1.1-ALPHA-6
Author:
Fabrizio Giudici
  • Field Details

  • Constructor Details

    • ToolBarControlSupport

      protected ToolBarControlSupport()
      Default constructor.
  • Method Details

    • populate

      public void populate(@Nonnull B binder, @Nonnull T toolBar)
      Populates the menu bar with menus.
      Specified by:
      populate in interface ToolBarControl<B,T>
      Parameters:
      binder - the binder
      toolBar - the toolbar
    • createButton

      @Nonnull protected abstract BT createButton(@Nonnull B binder, @Nonnull UserAction action)
      Creates a button bound to the given UserAction.
      Parameters:
      binder - the binder
      action - the user action
      Returns:
      the button
    • addButtonsToToolBar

      protected abstract void addButtonsToToolBar(@Nonnull T toolBar, @Nonnull List<BT> buttons)
      Adds buttons to the toolbar.
      Parameters:
      toolBar - the toolbar
      buttons - the button