com.vaadin.client.widget.grid.

Class RowReference<T>

  • Type Parameters:

    T - the row object type

    public class RowReference<T>
    extends Object

    A data class which contains information which identifies a row 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 Summary

      Constructors
      Constructor Description
      RowReference​(Grid<T> grid)

      Creates a new row reference for the given grid.

    • Constructor Detail

      • RowReference

        public RowReference​(Grid<T> grid)

        Creates a new row reference for the given grid.

        Parameters:

        grid - the grid that the row belongs to

    • Method Detail

      • set

        public void set​(int rowIndex,
                        T row,
                        com.google.gwt.dom.client.TableRowElement element)

        Sets the identifying information for this row.

        Parameters:

        rowIndex - the index of the row

        row - the row object

        element - the element of the row

      • getGrid

        public Grid<T> getGrid()

        Gets the grid that contains the referenced row.

        Returns:

        the grid that contains referenced row

      • getRowIndex

        public int getRowIndex()

        Gets the row index of the row.

        Returns:

        the index of the row

      • getRow

        public T getRow()

        Gets the row data object.

        Returns:

        the row object

      • getElement

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

        Gets the table row element of the row.

        Returns:

        the element of the row