Package com.vaadin.client.widget.grid
Class RowReference<T>
- java.lang.Object
-
- com.vaadin.client.widget.grid.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 aGrid
.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.dom.client.TableRowElement
getElement()
Gets the table row element of the row.Grid<T>
getGrid()
Gets the grid that contains the referenced row.T
getRow()
Gets the row data object.int
getRowIndex()
Gets the row index of the row.void
set(int rowIndex, T row, com.google.gwt.dom.client.TableRowElement element)
Sets the identifying information for this row.
-
-
-
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 rowrow
- the row objectelemenet
- 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
-
-