Package com.vaadin.client.widget.grid
Class RendererCellReference
- java.lang.Object
-
- com.vaadin.client.widget.grid.CellReference<Object>
-
- com.vaadin.client.widget.grid.RendererCellReference
-
public class RendererCellReference extends CellReference<Object>
A data class which contains information which identifies a cell being rendered 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 RendererCellReference(RowReference<Object> rowReference)
Creates a new renderer cell reference bound to a row reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColSpan()
Gets the colspan attribute of the element of this cell.com.google.gwt.dom.client.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
-
-
-
-
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 referencecolumnIndex
- the index of the column in the grid, including hidden cellscolumn
- the column to reference
-
getElement
public com.google.gwt.dom.client.TableCellElement getElement()
Returns the element of the cell. Can be either aTD
element or aTH
element.- Overrides:
getElement
in classCellReference<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
-
-