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 Link icon

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

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

    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 Link icon

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor.
  • Method Summary Link icon

    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 Link icon

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

    Methods inherited from interface it.tidalwave.util.As Link icon

    as, as, asMany, asMany, maybeAs, maybeAs
  • Field Details Link icon

    • userActionsSupplier Link icon

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

    • ToolBarModelSupport Link icon

      protected ToolBarModelSupport()
      Default constructor.
  • Method Details Link icon

    • populate Link icon

      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 Link icon

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