com.vaadin.client.widget.grid
Class RendererCellReference

java.lang.Object
  extended by com.vaadin.client.widget.grid.CellReference<java.lang.Object>
      extended by com.vaadin.client.widget.grid.RendererCellReference

public class RendererCellReference
extends CellReference<java.lang.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 Summary
RendererCellReference(RowReference<java.lang.Object> rowReference)
          Creates a new renderer cell reference bound to a row reference.
 
Method Summary
 int getColSpan()
          Gets the colspan attribute of the element of this cell.
 TableCellElement getElement()
          Returns the element of the cell.
 void set(FlyweightCell cell, int columnIndex, Grid.Column<?,?> column)
          Sets the identifying information for this cell.
 void setColSpan(int numberOfCells)
          Sets the colspan attribute of the element of this cell.
 
Methods inherited from class com.vaadin.client.widget.grid.CellReference
getColumn, getColumnIndex, getColumnIndexDOM, getGrid, getRow, getRowIndex, getRowReference, getValue, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererCellReference

public RendererCellReference(RowReference<java.lang.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 TableCellElement getElement()
Returns the element of the cell. Can be either a TD element or a TH element.

Overrides:
getElement in class CellReference<java.lang.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


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