Package processing.event
Class MouseEvent
java.lang.Object
processing.event.Event
processing.event.MouseEvent
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionMouseEvent
(Object nativeObject, long millis, int action, int modifiers, int x, int y, int button, int count) -
Method Summary
Methods inherited from class processing.event.Event
getAction, getFlavor, getMillis, getModifiers, getNative, isAltDown, isControlDown, isMetaDown, isShiftDown
-
Field Details
-
PRESS
public static final int PRESS- See Also:
-
RELEASE
public static final int RELEASE- See Also:
-
CLICK
public static final int CLICK- See Also:
-
DRAG
public static final int DRAG- See Also:
-
MOVE
public static final int MOVE- See Also:
-
ENTER
public static final int ENTER- See Also:
-
EXIT
public static final int EXIT- See Also:
-
WHEEL
public static final int WHEEL- See Also:
-
-
Constructor Details
-
MouseEvent
public MouseEvent(Object nativeObject, long millis, int action, int modifiers, int x, int y, int button, int count)
-
-
Method Details
-
getX
public int getX() -
getY
public int getY() -
getButton
public int getButton()Which button was pressed, either LEFT, CENTER, or RIGHT. -
getCount
public int getCount()Number of clicks for mouse button events, or the number of steps (positive or negative depending on direction) for a mouse wheel event. Wheel events follow Java (see here), so getAmount() will return "negative values if the mouse wheel was rotated up or away from the user" and positive values in the other direction. On Mac OS X, this will be reversed when "natural" scrolling is enabled in System Preferences &rarr Mouse. -
toString
-