com.vaadin.client.widget.grid.

Class RendererCellReference

  • public class RendererCellReference
    extends CellReference<Object>

    A data class which contains information which identifies a cell being rendered in a Grid.

    Since this class follows the Flyweight-pattern any instance of this object is subject to change without the user knowing it and so should not be stored anywhere outside of the method providing these instances.

    Since:

    7.4

    Author:

    Vaadin Ltd

    • Constructor Detail

      • RendererCellReference

        public RendererCellReference​(RowReference<Object> rowReference)

        Creates a new renderer cell reference bound to a row reference.

        Parameters:

        rowReference - the row reference to bind to

    • Method Detail

      • set

        public void set​(FlyweightCell cell,
                        int columnIndex,
                        Grid.Column<?,​?> column)

        Sets the identifying information for this cell.

        Parameters:

        cell - the flyweight cell to reference

        columnIndex - the index of the column in the grid, including hidden cells

        column - the column to reference

      • getElement

        public com.google.gwt.dom.client.TableCellElement getElement()

        Returns the element of the cell. Can be either a TD element or a TH element.

        Overrides:

        getElement in class CellReference<Object>

        Returns:

        the element of the cell

      • setColSpan

        public void setColSpan​(int numberOfCells)

        Sets the colspan attribute of the element of this cell.

        Parameters:

        numberOfCells - the number of columns that the cell should span

      • getColSpan

        public int getColSpan()

        Gets the colspan attribute of the element of this cell.

        Returns:

        the number of columns that the cell should span