Class GroupItemClickEvent<E>
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<GroupDataGrid<E>>
io.jmix.groupgridflowui.component.event.GroupItemClickEvent<E>
- Type Parameters:
E- the entity type
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GroupItemDoubleClickEvent
public class GroupItemClickEvent<E>
extends com.vaadin.flow.component.ComponentEvent<GroupDataGrid<E>>
Event fired when a row that corresponds to a group item is clicked.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ItemClickEvent<E>protected final Grid.Column<E>protected final GroupInfoprotected final EFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGroupItemClickEvent(GroupDataGrid<E> source, boolean fromClient, ItemClickEvent<E> clickEvent, GroupInfo groupInfo) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the id of the pressed mouse button: -1: No button 0: The primary button, typically the left mouse button 1: The middle button, 2: The secondary button, typically the right mouse button 3: The first additional button, typically the back button 4: The second additional button, typically the forward button 5+: More additional buttons without any typical meaningsintReturns the number of clicks that happened on the item.intReturns the X coordinate of the click event, relative to the upper left corner of the browser viewport.intReturns the Y coordinate of the click event, relative to the upper left corner of the browser viewport.Returns the column that was clicked.Returns the group info that corresponds to the clicked item.getItem()Returns the clicked item.intReturns the X coordinate of the click event, relative to the upper left corner of the screenintReturns the Y coordinate of the click event, relative to the upper left corner of the screenbooleanisAltKey()Checks whether the ALT key was down when the event was fired.booleanChecks whether the CTRL key was down when the event was fired.booleanChecks whether the META key was down when the event was fired.booleanChecks whether the SHIFT key was down when the event was fired.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Field Details
-
clickEvent
-
column
-
item
-
groupInfo
-
-
Constructor Details
-
GroupItemClickEvent
public GroupItemClickEvent(GroupDataGrid<E> source, boolean fromClient, ItemClickEvent<E> clickEvent, GroupInfo groupInfo)
-
-
Method Details
-
getItem
Returns the clicked item.- Returns:
- the clicked item
-
getColumn
Returns the column that was clicked.- Returns:
- the clicked column or
nullif it was the multi-selection column.
-
getGroupInfo
Returns the group info that corresponds to the clicked item.- Returns:
- group info
-
getScreenX
public int getScreenX()Returns the X coordinate of the click event, relative to the upper left corner of the screen- Returns:
- the X coordinate or
-1if unknown
-
getScreenY
public int getScreenY()Returns the Y coordinate of the click event, relative to the upper left corner of the screen- Returns:
- the Y coordinate or
-1if unknown
-
getClientX
public int getClientX()Returns the X coordinate of the click event, relative to the upper left corner of the browser viewport.- Returns:
- the X coordinate or
-1if unknown
-
getClientY
public int getClientY()Returns the Y coordinate of the click event, relative to the upper left corner of the browser viewport.- Returns:
- the Y coordinate or
-1if unknown
-
getClickCount
public int getClickCount()Returns the number of clicks that happened on the item.- Returns:
- the click count
-
getButton
public int getButton()Returns the id of the pressed mouse button:- -1: No button
- 0: The primary button, typically the left mouse button
- 1: The middle button,
- 2: The secondary button, typically the right mouse button
- 3: The first additional button, typically the back button
- 4: The second additional button, typically the forward button
- 5+: More additional buttons without any typical meanings
- Returns:
- the button id or
-1if no button was pressed
-
isCtrlKey
public boolean isCtrlKey()Checks whether the CTRL key was down when the event was fired.- Returns:
trueif the CTRL key was down when the event was fired,falseotherwise
-
isShiftKey
public boolean isShiftKey()Checks whether the SHIFT key was down when the event was fired.- Returns:
trueif the SHIFT key was down when the event was fired,falseotherwise
-
isAltKey
public boolean isAltKey()Checks whether the ALT key was down when the event was fired.- Returns:
trueif the ALT key was down when the event was fired,falseotherwise
-
isMetaKey
public boolean isMetaKey()Checks whether the META key was down when the event was fired.- Returns:
trueif the META key was down when the event was fired,falseotherwise
-