Interface ClickEvent

All Superinterfaces:
Serializable
All Known Implementing Classes:
ChartClickEvent, PointClickEvent, PointLegendItemClickEvent, SeriesClickEvent, SeriesLegendItemClickEvent

public interface ClickEvent extends Serializable
  • Method Details

    • getMouseDetails

      MouseEventDetails getMouseDetails()
      Gets the mouse click details
      Returns:
    • getxAxisValue

      default double getxAxisValue()
      Gets the x axis value of the clicked point.

      Note, that if the axis type is Date, the value is "unix timestamp" which is shifted to UTF time zone that is used by the client side implementation. If you have used Date object as value, you most likely want to pass the value thru Util.toServerDate(double) method before actually using the value.

      Legend items are outside of the plot area and legend item click events have no significant xAxisValue.

      Returns:
      the X coordinate of the click.
    • getyAxisValue

      default double getyAxisValue()
      Gets the y axis value of the clicked point.

      Legend items are outside of the plot area and legend item click events have no significant yAxisValue.

      Returns:
      the Y coordinate of the click
    • getAbsoluteX

      default int getAbsoluteX()
      Returns:
      the absolute x position of the clicked point in browser client area in pixels or -1 if chart type (like pie) don't have relevant point
    • getAbsoluteY

      default int getAbsoluteY()
      Returns:
      the absolute x position of the clicked point in browser client area in pixels or -1 if chart type (like pie) don't have relevant point
    • getButton

      default MouseEventDetails.MouseButton getButton()
      Gets the MouseEventDetails.MouseButton of the click event.

      Note that the charting library only allows MouseButton.LEFT clicks in most cases.

      Returns:
      the MouseEventDetails.MouseButton of the click event.
    • isAltKey

      default 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

      default 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

      default 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

      default 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