Interface RowActionsRenderer<T>

Type Parameters:
T - the grid bean type
All Superinterfaces:
Serializable

public interface RowActionsRenderer<T> extends Serializable
Strategy interface for rendering the row actions of an EasyGrid. Implementations decide how the actions are presented: as inline buttons in a dedicated column, as an overflow/context menu, or any other mechanism.

An instance is held by RowActionsManager and is called whenever the action list changes and a visual refresh is needed.

Author:
Javier Godoy / Flowing Code
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Grid.Column used to host the actions, if this renderer uses a dedicated column.
    default void
    Cleans up all UI elements created by this renderer (columns, context menus, etc.).
    void
    Rebuilds the visual representation to reflect the given action list.
  • Method Details

    • update

      void update(List<EasyRowAction<T>> actions)
      Rebuilds the visual representation to reflect the given action list. Called on every scheduled renderer update. Implementations that use a Grid.Column should create it on the first call and update its renderer on subsequent calls. Renderers are responsible for any data-view refresh their presentation requires.
      Parameters:
      actions - the current list of registered actions (unmodifiable)
    • getColumn

      Grid.Column<T> getColumn()
      Returns the Grid.Column used to host the actions, if this renderer uses a dedicated column. Renderers that present actions through a context menu or another mechanism not tied to a column should return null.
      Returns:
      the actions column, or null if not applicable
    • remove

      default void remove()
      Cleans up all UI elements created by this renderer (columns, context menus, etc.). Called by RowActionsManager when the renderer is being replaced. The default implementation is a no-op.