com.vaadin.client.widget.grid
Class RowReference<T>

java.lang.Object
  extended by com.vaadin.client.widget.grid.RowReference<T>
Type Parameters:
T - the row object type

public class RowReference<T>
extends java.lang.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
RowReference(Grid<T> grid)
          Creates a new row reference for the given grid.
 
Method Summary
 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, TableRowElement element)
          Sets the identifying information for this row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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,
                TableRowElement element)
Sets the identifying information for this row.

Parameters:
rowIndex - the index of the row
row - the row object
elemenet - 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 TableRowElement getElement()
Gets the table row element of the row.

Returns:
the element of the row


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.