Interface Table.CellStyleGenerator

All Superinterfaces:
Serializable
Enclosing class:
Table
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Table.CellStyleGenerator extends Serializable
Allow to define specific style on cells (and rows) contents. Implements this interface and pass it to Table.setCellStyleGenerator. Row styles are generated when propertyId is null. The CSS class name that will be added to the cell content is v-table-cell-content-[style name], and the row style will be v-table-row-[style name].
  • Method Summary

    Modifier and Type
    Method
    Description
    getStyle(Table source, Object itemId, Object propertyId)
    Called by Table when a cell (and row) is painted.
  • Method Details

    • getStyle

      String getStyle(Table source, Object itemId, Object propertyId)
      Called by Table when a cell (and row) is painted.
      Parameters:
      source - the source Table
      itemId - The itemId of the painted cell
      propertyId - The propertyId of the cell, null when getting row style
      Returns:
      The style name to add to this cell or row. (the CSS class name will be v-table-cell-content-[style name], or v-table-row-[style name] for rows)