Class GridI18n

java.lang.Object
com.vaadin.flow.component.grid.GridI18n
All Implemented Interfaces:
Serializable

public class GridI18n extends Object implements Serializable
The internationalization properties for Grid. This can be used to customize and translate the accessible names used by the grid.
Since:
25.3
Author:
Vaadin Ltd.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the accessible name (aria-label) for the select all checkbox in the selection column header cell.
    Gets the accessible name announced for the selection column header cell when the select all checkbox is hidden (e.g. a data provider is used or conditional selection is enabled), rendered as a screen-reader-only label in the cell.
    Gets the accessible name (aria-label) template for the select row checkbox in each selection column body cell.
    Gets the accessible name (aria-label) template for the grid sorters.
    setSelectAll(String selectAll)
    Sets the accessible name (aria-label) for the select all checkbox in the selection column header cell.
    setSelectAllUnavailable(String selectAllUnavailable)
    Sets the accessible name announced for the selection column header cell when the select all checkbox is hidden (e.g. a data provider is used or conditional selection is enabled), rendered as a screen-reader-only label in the cell.
    setSelectRow(String selectRow)
    Sets the accessible name (aria-label) template for the select row checkbox in each selection column body cell.
    setSorter(String sorter)
    Sets the accessible name (aria-label) template for the grid sorters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GridI18n

      public GridI18n()
  • Method Details

    • getSelectAll

      public String getSelectAll()
      Gets the accessible name (aria-label) for the select all checkbox in the selection column header cell.
      Returns:
      the accessible name for the select all checkbox
    • setSelectAll

      public GridI18n setSelectAll(String selectAll)
      Sets the accessible name (aria-label) for the select all checkbox in the selection column header cell.
      Parameters:
      selectAll - the accessible name for the select all checkbox
      Returns:
      this instance for method chaining
    • getSelectAllUnavailable

      public String getSelectAllUnavailable()
      Gets the accessible name announced for the selection column header cell when the select all checkbox is hidden (e.g. a data provider is used or conditional selection is enabled), rendered as a screen-reader-only label in the cell.
      Returns:
      the accessible name for the header cell when select all is unavailable
    • setSelectAllUnavailable

      public GridI18n setSelectAllUnavailable(String selectAllUnavailable)
      Sets the accessible name announced for the selection column header cell when the select all checkbox is hidden (e.g. a data provider is used or conditional selection is enabled), rendered as a screen-reader-only label in the cell.
      Parameters:
      selectAllUnavailable - the accessible name for the header cell when select all is unavailable
      Returns:
      this instance for method chaining
    • getSelectRow

      public String getSelectRow()
      Gets the accessible name (aria-label) template for the select row checkbox in each selection column body cell.
      Returns:
      the accessible name template for the select row checkbox
    • setSelectRow

      public GridI18n setSelectRow(String selectRow)
      Sets the accessible name (aria-label) template for the select row checkbox in each selection column body cell. The {rowHeader} placeholder is replaced with the text content of the row's row-header cell (see Grid.Column.setRowHeader(boolean)), or the 1-based row index when there is no row-header column.
      Parameters:
      selectRow - the accessible name template for the select row checkbox
      Returns:
      this instance for method chaining
    • getSorter

      public String getSorter()
      Gets the accessible name (aria-label) template for the grid sorters.
      Returns:
      the accessible name template for the sorters
    • setSorter

      public GridI18n setSorter(String sorter)
      Sets the accessible name (aria-label) template for the grid sorters. The {column} placeholder is replaced with the column header text.
      Parameters:
      sorter - the accessible name template for the sorters
      Returns:
      this instance for method chaining