Class ItemClickEvent<T>

Type Parameters:
T - the grid bean type
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ItemDoubleClickEvent

@DomEvent("item-click") public class ItemClickEvent<T> extends ClickEvent<Grid<T>>
Event fired when a Grid item is clicked.
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • ItemClickEvent

      public ItemClickEvent(Grid<T> source, boolean fromClient, @EventData("event.detail.itemKey") String itemKey, @EventData("event.detail.internalColumnId") String internalColumnId, @EventData("event.detail.screenX") int screenX, @EventData("event.detail.screenY") int screenY, @EventData("event.detail.clientX") int clientX, @EventData("event.detail.clientY") int clientY, @EventData("event.detail.detail") int clickCount, @EventData("event.detail.button") int button, @EventData("event.detail.ctrlKey") boolean ctrlKey, @EventData("event.detail.shiftKey") boolean shiftKey, @EventData("event.detail.altKey") boolean altKey, @EventData("event.detail.metaKey") boolean metaKey)
      Creates a new item click event.
      Parameters:
      source - the component that fired the event
      fromClient - true if the event was originally fired on the client, false if the event originates from server-side logic
      itemKey - the item mapper key
      internalColumnId - the internal id of the column associated with the click event
      screenX - the x coordinate of the click event, relative to the upper left corner of the screen, -1 if unknown
      screenY - the y coordinate of the click event, relative to the upper left corner of the screen, -i if unknown
      clientX - the x coordinate of the click event, relative to the upper left corner of the browser viewport, -1 if unknown
      clientY - the y coordinate of the click event, relative to the upper left corner of the browser viewport, -1 if unknown
      clickCount - the number of consecutive clicks recently recorded
      button - the id of the pressed mouse button
      ctrlKey - true if the control key was down when the event was fired, false otherwise
      shiftKey - true if the shift key was down when the event was fired, false otherwise
      altKey - true if the alt key was down when the event was fired, false otherwise
      metaKey - true if the meta key was down when the event was fired, false otherwise
  • Method Details

    • getItem

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

      public Grid.Column<T> getColumn()
      Gets the column that was clicked.
      Returns:
      the clicked column, not null