com.vaadin.flow.component.grid.
Class CellFocusEvent<T>
Type Parameters:
T
- the grid bean type
All Implemented Interfaces:
Event fired when a cell in the Grid is focused.
Author:
Vaadin Ltd
See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum representing the different sections of a grid.
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the column represented by the focused cell.
getItem()
Returns the item represented by the focused cell.
Returns the grid section, where this cell is located.
boolean
Indicates, if the clicked cell is part of the grid's body section.
boolean
Indicates, if the clicked cell is part of the grid's footer section.
boolean
Indicates, if the clicked cell is part of the grid's header section.
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
CellFocusEvent
public CellFocusEvent(Grid<T> source, boolean fromClient, @EventData("event.detail.itemKey") String itemKey, @EventData("event.detail.internalColumnId") String internalColumnId, @EventData("event.detail.section") String sectionName) Creates a new cell focus event.
Parameters:
source
- the source componentfromClient
-true
if the event originated from the client
-
-
Method Details
-
isBodyCell
public boolean isBodyCell()Indicates, if the clicked cell is part of the grid's body section.
Returns:
is a body cell
-
isHeaderCell
public boolean isHeaderCell()Indicates, if the clicked cell is part of the grid's header section.
Returns:
is a header cell
-
getSection
Returns the grid section, where this cell is located. Never null.
Returns:
section
-
getItem
Returns the item represented by the focused cell. Is empty, when the focused cell is not a body cell.
Returns:
item or empty
-
getColumn
Returns the column represented by the focused cell. Is empty, when the focused cell is a header group (a cell with a cellspan > 1).
Returns:
column or empty
-