Class MouseEvent
java.lang.Object
com.amalgamasimulation.visualsets.utils.MouseEvent
-
Constructor Summary
ConstructorsConstructorDescriptionMouseEvent(double x, double y, double screenX, double screenY, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, MouseButton button) -
Method Summary
Modifier and TypeMethodDescriptionfinal MouseButtonWhich, if any, of the mouse buttons is responsible for this event.intReturns number of mouse clicks associated with this event.final doubleReturns absolute horizontal position of the event.final doubleReturns absolute vertical position of the event.doublegetX()Horizontal position of the event relative to the origin of the MouseEvent's source.doublegetY()Vertical position of the event relative to the origin of the MouseEvent's source.booleanWhether or not the Alt modifier is down on this event.booleanWhether or not the Control modifier is down on this event.booleanWhether or not the Shift modifier is down on this event.
-
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
Which, if any, of the mouse buttons is responsible for this event.- Returns:
- mouse button whose state change caused this event
-