Class DataGrid.DataGridClickEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataGrid.ContextClickEvent, DataGrid.ItemClickEvent, DataGrid.RendererClickEvent
Enclosing interface:
DataGrid<E>

public static class DataGrid.DataGridClickEvent extends DataGrid.AbstractDataGridEvent
Class for holding information about a mouse click event. A DataGrid.DataGridClickEvent is fired when the user clicks on a Component.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getButton

      public MouseEventDetails.MouseButton getButton()
      Returns an identifier describing which mouse button the user pushed. Compare with MouseEventDetails.MouseButton.LEFT,MouseEventDetails.MouseButton.MIDDLE, MouseEventDetails.MouseButton.RIGHT to find out which button it is.
      Returns:
      one of MouseEventDetails.MouseButton.LEFT, MouseEventDetails.MouseButton.MIDDLE, MouseEventDetails.MouseButton.RIGHT.
    • getClientX

      public int getClientX()
      Returns the mouse position (x coordinate) when the click took place. The position is relative to the browser client area.
      Returns:
      The mouse cursor x position
    • getClientY

      public int getClientY()
      Returns the mouse position (y coordinate) when the click took place. The position is relative to the browser client area.
      Returns:
      The mouse cursor y position
    • getRelativeX

      public int getRelativeX()
      Returns the relative mouse position (x coordinate) when the click took place. The position is relative to the clicked component.
      Returns:
      The mouse cursor x position relative to the clicked layout component or -1 if no x coordinate available
    • getRelativeY

      public int getRelativeY()
      Returns the relative mouse position (y coordinate) when the click took place. The position is relative to the clicked component.
      Returns:
      The mouse cursor y position relative to the clicked layout component or -1 if no y coordinate available
    • isDoubleClick

      public boolean isDoubleClick()
      Checks if the event is a double click event.
      Returns:
      true if the event is a double click event, false otherwise
    • isAltKey

      public boolean isAltKey()
      Checks if the Alt key was down when the mouse event took place.
      Returns:
      true if Alt was down when the event occurred, false otherwise
    • isCtrlKey

      public boolean isCtrlKey()
      Checks if the Ctrl key was down when the mouse event took place.
      Returns:
      true if Ctrl was pressed when the event occurred, false otherwise
    • isMetaKey

      public boolean isMetaKey()
      Checks if the Meta key was down when the mouse event took place.
      Returns:
      true if Meta was pressed when the event occurred, false otherwise
    • isShiftKey

      public boolean isShiftKey()
      Checks if the Shift key was down when the mouse event took place.
      Returns:
      true if Shift was pressed when the event occurred, false otherwise