Class ToolBarModelSupport<B,T>

java.lang.Object
it.tidalwave.role.ui.spi.ToolBarModelSupport<B,T>
Type Parameters:
B - the concrete type of the binder
T - the concrete type of the toolbar
All Implemented Interfaces:
ToolBarModel, it.tidalwave.util.As

public abstract class ToolBarModelSupport<B,T> extends Object implements ToolBarModel
A support implementation for ToolBarModel.
Since:
1.1-ALPHA-6
Author:
Fabrizio Giudici
  • Nested Class Summary

    Nested classes/interfaces inherited from interface it.tidalwave.util.As

    it.tidalwave.util.As.Type<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Supplier<Collection<? extends it.tidalwave.role.ui.UserAction>>
    The default supplier of UserActions, can be injected for testing.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    populate(Object binder, Object toolBar)
    Populates the toolbar with buttons.
    protected abstract void
    populateImpl(B binder, T toolBar)
    Populates the menu bar with menus.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface it.tidalwave.util.As

    as, as, asMany, asMany, maybeAs, maybeAs
  • Field Details

    • userActionsSupplier

      @Nonnull protected final Supplier<Collection<? extends it.tidalwave.role.ui.UserAction>> userActionsSupplier
      The default supplier of UserActions, can be injected for testing.
  • Constructor Details

    • ToolBarModelSupport

      protected ToolBarModelSupport()
      Default constructor.
  • Method Details

    • populate

      public final void populate(@Nonnull Object binder, @Nonnull Object toolBar)
      Populates the toolbar with buttons.
      Specified by:
      populate in interface ToolBarModel
      Parameters:
      binder - the binder
      toolBar - the toolbar
    • populateImpl

      protected abstract void populateImpl(@Nonnull B binder, @Nonnull T toolBar)
      Populates the menu bar with menus.
      Parameters:
      binder - the binder
      toolBar - the toolbar