com.holonplatform.vaadin.flow.components.events

## Interface ClickEvent<S>

- Type Parameters:
    `S` - Source type
  All Superinterfaces:
    Event<S>, Serializable
  All Known Subinterfaces:
    ItemClickEvent<S,T>, ItemListingClickEvent<S,T,P>

      public interface ClickEvent<S>
      extends Event<S>

  Event fired when a component is clicked.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getButton()` Gets the id of the pressed mouse button.
    `int` | `getClickCount()` Gets the number of consecutive clicks recently recorded.
    `int` | `getClientX()` Gets the x coordinate of the click event, relative to the upper left corner of the browser viewport.
    `int` | `getClientY()` Gets the y coordinate of the click event, relative to the upper left corner of the browser viewport.
    `int` | `getScreenX()` Gets the x coordinate of the click event, relative to the upper left corner of the screen.
    `int` | `getScreenY()` Gets the y coordinate of the click event, relative to the upper left corner of the screen.
    `boolean` | `isAltKey()` Checks whether the alt key was was down when the event was fired.
    `boolean` | `isCtrlKey()` Checks whether the ctrl key was was down when the event was fired.
    `boolean` | `isFromClient()` Checks if this event originated from the client side.
    `boolean` | `isMetaKey()` Checks whether the meta key was was down when the event was fired.
    `boolean` | `isShiftKey()` Checks whether the shift key was was down when the event was fired.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.events.Event

      `getSource`

- - ### Method Detail

    - #### isFromClient

          boolean isFromClient()

      Checks if this event originated from the client side.
      Returns:
        `true` if the event originated from the client side, `false` otherwise

    - #### getClientX

          int getClientX()

      Gets the x coordinate of the click event, relative to the upper left corner of the browser viewport.
      Returns:
        the x coordinate, -1 if unknown

    - #### getClientY

          int getClientY()

      Gets the y coordinate of the click event, relative to the upper left corner of the browser viewport.
      Returns:
        the y coordinate, -1 if unknown

    - #### getScreenX

          int getScreenX()

      Gets the x coordinate of the click event, relative to the upper left corner of the screen.
      Returns:
        the x coordinate, -1 if unknown

    - #### getScreenY

          int getScreenY()

      Gets the y coordinate of the click event, relative to the upper left corner of the screen.
      Returns:
        the y coordinate, -1 if unknown

    - #### getClickCount

          int getClickCount()

      Gets the number of consecutive clicks recently recorded.
      Returns:
        the click count

    - #### getButton

          int getButton()

      Gets 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

          boolean isCtrlKey()

      Checks whether the ctrl key was was down when the event was fired.
      Returns:
        `true` if the ctrl key was down when the event was fired, `false` otherwise

    - #### isAltKey

          boolean isAltKey()

      Checks whether the alt key was was down when the event was fired.
      Returns:
        `true` if the alt key was down when the event was fired, `false` otherwise

    - #### isMetaKey

          boolean isMetaKey()

      Checks whether the meta key was was down when the event was fired.
      Returns:
        `true` if the meta key was down when the event was fired, `false` otherwise

    - #### isShiftKey

          boolean isShiftKey()

      Checks whether the shift key was was down when the event was fired.
      Returns:
        `true` if the shift key was down when the event was fired, `false` otherwise

Copyright © 2020 The Holon Platform. All rights reserved.