Package com.vaadin.client.renderers
Interface Renderer<T>
-
- Type Parameters:
T
- The column type
- All Known Implementing Classes:
ButtonRenderer
,ClickableRenderer
,ComplexRenderer
,DateRenderer
,HtmlRenderer
,ImageRenderer
,MultiSelectionRenderer
,NumberRenderer
,ProgressBarRenderer
,TextRenderer
,UnsafeHtmlRendererConnector.UnsafeHtmlRenderer
,WidgetRenderer
public interface Renderer<T>
Renderer for rending a value <T> into cell.You can add a renderer to any column by overring the
GridColumn#getRenderer()
method and returning your own renderer. You can retrieve the cell element usingCell.getElement()
.- Since:
- 7.4
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
render(RendererCellReference cell, T data)
Called whenever theGrid
updates a cell.
-
-
-
Method Detail
-
render
void render(RendererCellReference cell, T data)
Called whenever theGrid
updates a cell.For optimal performance, work done in this method should be kept to a minimum since it will be called continuously while the user is scrolling. It is recommended to set up the cell's DOM structure in
ComplexRenderer.init(RendererCellReference)
and only make incremental updates based on cell data in this method.- Parameters:
cell
- The cell. Note that the cell is a flyweight and should not be stored outside of the method as it will change.data
- The column data object
-
-