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

    Fields
    Modifier and Type
    Field
    Description
    protected final ItemClickEvent<E>
     
    protected final Grid.Column<E>
     
    protected final GroupInfo
     
    protected final E
     

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    GroupItemClickEvent(GroupDataGrid<E> source, boolean fromClient, ItemClickEvent<E> clickEvent, GroupInfo groupInfo)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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
    int
    Returns the number of clicks that happened on the item.
    int
    Returns the X coordinate of the click event, relative to the upper left corner of the browser viewport.
    int
    Returns 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.
    Returns the clicked item.
    int
    Returns the X coordinate of the click event, relative to the upper left corner of the screen
    int
    Returns the Y coordinate of the click event, relative to the upper left corner of the screen
    boolean
    Checks whether the ALT key was down when the event was fired.
    boolean
    Checks whether the CTRL key was down when the event was fired.
    boolean
    Checks whether the META key was down when the event was fired.
    boolean
    Checks whether the SHIFT key was down when the event was fired.

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getItem

      public E getItem()
      Returns the clicked item.
      Returns:
      the clicked item
    • getColumn

      public Grid.Column<E> getColumn()
      Returns the column that was clicked.
      Returns:
      the clicked column or null if it was the multi-selection column.
    • getGroupInfo

      public GroupInfo 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 -1 if 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 -1 if 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 -1 if 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 -1 if 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 -1 if no button was pressed
    • isCtrlKey

      public boolean isCtrlKey()
      Checks whether the CTRL key was down when the event was fired.
      Returns:
      true if the CTRL key was down when the event was fired, false otherwise
    • isShiftKey

      public boolean isShiftKey()
      Checks whether the SHIFT key was down when the event was fired.
      Returns:
      true if the SHIFT key was down when the event was fired, false otherwise
    • isAltKey

      public boolean isAltKey()
      Checks whether the ALT key was down when the event was fired.
      Returns:
      true if the ALT key was down when the event was fired, false otherwise
    • isMetaKey

      public boolean isMetaKey()
      Checks whether the META key was down when the event was fired.
      Returns:
      true if the META key was down when the event was fired, false otherwise