Package com.vaadin.client.widget.grid
Class EventCellReference<T>
- java.lang.Object
-
- com.vaadin.client.widget.grid.CellReference<T>
-
- com.vaadin.client.widget.grid.EventCellReference<T>
-
- Type Parameters:
T- The row type of the grid. The row type is the POJO type from where the data is retrieved into the column cells.
public class EventCellReference<T> extends CellReference<T>
A data class which contains information which identifies a cell being the target of an event fromGrid.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 EventCellReference(Grid<T> grid)Constructs a cell reference for an event targeting a grid cell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.dom.client.TableCellElementgetElement()Get the element of the cell.GridConstants.SectiongetSection()Gets the Grid section where the referenced cell is.booleanisBody()Is the cell reference for a cell in the body of the Grid.booleanisFooter()Is the cell reference for a cell in the footer of the Grid.booleanisHeader()Is the cell reference for a cell in the header of the Grid.voidset(Cell targetCell, GridConstants.Section section)Configures this CellReference and its internal RowReference to point to the given Cell.-
Methods inherited from class com.vaadin.client.widget.grid.CellReference
getColumn, getColumnIndex, getColumnIndexDOM, getGrid, getRow, getRowIndex, getRowReference, getValue, set
-
-
-
-
Constructor Detail
-
EventCellReference
public EventCellReference(Grid<T> grid)
Constructs a cell reference for an event targeting a grid cell. Needs to be populated usingset(Cell, Section).- Parameters:
grid- the grid the event originates from- See Also:
EventCellReference
-
-
Method Detail
-
set
public void set(Cell targetCell, GridConstants.Section section)
Configures this CellReference and its internal RowReference to point to the given Cell.- Parameters:
targetCell- the cell to point tosection- the section the cell belongs to
-
getElement
public com.google.gwt.dom.client.TableCellElement getElement()
Description copied from class:CellReferenceGet the element of the cell.- Overrides:
getElementin classCellReference<T>- Returns:
- the element of the cell
-
isHeader
public boolean isHeader()
Is the cell reference for a cell in the header of the Grid.- Returns:
trueif referenced cell is in the header,falseif not- Since:
- 7.5
-
isBody
public boolean isBody()
Is the cell reference for a cell in the body of the Grid.- Returns:
trueif referenced cell is in the body,falseif not- Since:
- 7.5
-
isFooter
public boolean isFooter()
Is the cell reference for a cell in the footer of the Grid.- Returns:
trueif referenced cell is in the footer,falseif not- Since:
- 7.5
-
getSection
public GridConstants.Section getSection()
Gets the Grid section where the referenced cell is.- Returns:
- grid section
- Since:
- 7.5
-
-