Class CellFocusEvent<T>
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Grid<T>>
io.jmix.groupgridflowui.kit.vaadin.grid.CellFocusEvent<T>
- Type Parameters:
T- the grid bean type
- All Implemented Interfaces:
Serializable
@DomEvent("grid-cell-focus")
public class CellFocusEvent<T>
extends com.vaadin.flow.component.ComponentEvent<Grid<T>>
Event fired when a cell in the Grid is focused.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn 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.booleanIndicates, if the clicked cell is part of the grid's body section.booleanIndicates, if the clicked cell is part of the grid's footer section.booleanIndicates, if the clicked cell is part of the grid's header section.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods 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-trueif 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
-