Class MouseEvent

java.lang.Object
com.amalgamasimulation.visualsets.utils.MouseEvent

public class MouseEvent extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    MouseEvent(double x, double y, double screenX, double screenY, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, MouseButton button)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Which, if any, of the mouse buttons is responsible for this event.
    int
    Returns number of mouse clicks associated with this event.
    final double
    Returns absolute horizontal position of the event.
    final double
    Returns absolute vertical position of the event.
    double
    Horizontal position of the event relative to the origin of the MouseEvent's source.
    double
    Vertical position of the event relative to the origin of the MouseEvent's source.
    boolean
    Whether or not the Alt modifier is down on this event.
    boolean
    Whether or not the Control modifier is down on this event.
    boolean
    Whether or not the Shift modifier is down on this event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MouseEvent

      public MouseEvent(double x, double y, double screenX, double screenY, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, MouseButton button)
  • Method Details

    • getX

      public double getX()
      Horizontal position of the event relative to the origin of the MouseEvent's source.
      Returns:
      horizontal position of the event relative to the origin of the MouseEvent's source.
    • getY

      public double getY()
      Vertical position of the event relative to the origin of the MouseEvent's source.
      Returns:
      vertical position of the event relative to the origin of the MouseEvent's source.
    • getClickCount

      public int getClickCount()
      Returns number of mouse clicks associated with this event.
      Returns:
      number of mouse clicks associated with this event
    • isShiftDown

      public boolean isShiftDown()
      Whether or not the Shift modifier is down on this event.
      Returns:
      true if the Shift modifier is down on this event
    • isControlDown

      public boolean isControlDown()
      Whether or not the Control modifier is down on this event.
      Returns:
      true if the Control modifier is down on this event
    • isAltDown

      public boolean isAltDown()
      Whether or not the Alt modifier is down on this event.
      Returns:
      true if the Alt modifier is down on this event
    • getScreenX

      public final double getScreenX()
      Returns absolute horizontal position of the event.
      Returns:
      absolute horizontal position of the event
    • getScreenY

      public final double getScreenY()
      Returns absolute vertical position of the event.
      Returns:
      absolute vertical position of the event
    • getButton

      public final MouseButton getButton()
      Which, if any, of the mouse buttons is responsible for this event.
      Returns:
      mouse button whose state change caused this event