Class MouseEvent

java.lang.Object
nl.saxion.app.interaction.MouseEvent

public class MouseEvent extends Object
Details about the mouse interaction. Gives information about which button was pressed
  • Constructor Details

    • MouseEvent

      public MouseEvent(int mouseType, int mouseButton, int x, int y)
  • Method Details

    • isMouseDown

      public boolean isMouseDown()
      Indicates if the mouse is pressed.
      Returns:
      true, is mouse button is currently pressed.
    • isMouseUp

      public boolean isMouseUp()
      Indicates if the mouse button is released.
      Returns:
      true, is mouse button is currently released.
    • isMouseDragging

      public boolean isMouseDragging()
      Indicates if the mouse button is down and currently dragging. Dragging means, it was already down and there is movement.
      Returns:
      true, is mouse is currently pressed and dragging.
    • isLeftMouseButton

      public boolean isLeftMouseButton()
      If left mouse button is used.
      Returns:
      true, if left mouse button was used for this event.
    • isMiddleMouseButton

      public boolean isMiddleMouseButton()
      If middle mouse button is used.
      Returns:
      true, if middle mouse button was used for this event.
    • isRightMouseButton

      public boolean isRightMouseButton()
      If right mouse button is used.
      Returns:
      true, if right mouse button was used for this event.
    • getX

      public int getX()
      X coordinate of the mouse cursor
      Returns:
      X coordinate of the mouse cursor
    • getY

      public int getY()
      Y coordinate of the mouse cursor
      Returns:
      Y coordinate of the mouse cursor
    • toString

      public String toString()
      Overrides:
      toString in class Object