Interface RowActionsRenderer<T>
- Type Parameters:
T- the grid bean type
- All Superinterfaces:
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:
-
HasRowActions.setRowActionsRenderer(RowActionsRenderer)LitRowActionsRenderer
-
Method Summary
Modifier and TypeMethodDescriptionReturns theGrid.Columnused to host the actions, if this renderer uses a dedicated column.default voidremove()Cleans up all UI elements created by this renderer (columns, context menus, etc.).voidupdate(List<EasyRowAction<T>> actions) Rebuilds the visual representation to reflect the given action list.
-
Method Details
-
update
Rebuilds the visual representation to reflect the given action list. Called on every scheduled renderer update. Implementations that use aGrid.Columnshould 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 theGrid.Columnused 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 returnnull.- Returns:
- the actions column, or
nullif not applicable
-
remove
default void remove()Cleans up all UI elements created by this renderer (columns, context menus, etc.). Called byRowActionsManagerwhen the renderer is being replaced. The default implementation is a no-op.
-