- java.lang.Object
-
- processing.event.Event
-
- processing.event.MouseEvent
-
public class MouseEvent extends Event
-
-
Constructor Summary
Constructors Constructor Description MouseEvent(Object nativeObject, long millis, int action, int modifiers, int x, int y, int button, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description floatgetAmount()Deprecated.intgetButton()Which button was pressed, either LEFT, CENTER, or RIGHT.intgetClickCount()Deprecated.intgetCount()Number of clicks for mouse button events, or the number of steps (positive or negative depending on direction) for a mouse wheel event.intgetX()intgetY()StringtoString()-
Methods inherited from class processing.event.Event
getAction, getFlavor, getMillis, getModifiers, getNative, isAltDown, isControlDown, isMetaDown, isShiftDown
-
-
-
-
Field Detail
-
PRESS
public static final int PRESS
- See Also:
- Constant Field Values
-
RELEASE
public static final int RELEASE
- See Also:
- Constant Field Values
-
CLICK
public static final int CLICK
- See Also:
- Constant Field Values
-
DRAG
public static final int DRAG
- See Also:
- Constant Field Values
-
MOVE
public static final int MOVE
- See Also:
- Constant Field Values
-
ENTER
public static final int ENTER
- See Also:
- Constant Field Values
-
EXIT
public static final int EXIT
- See Also:
- Constant Field Values
-
WHEEL
public static final int WHEEL
- See Also:
- Constant Field Values
-
x
protected int x
-
y
protected int y
-
button
protected int button
-
count
protected int count
-
-
Constructor Detail
-
MouseEvent
public MouseEvent(Object nativeObject, long millis, int action, int modifiers, int x, int y, int button, int count)
-
-
Method Detail
-
getX
public int getX()
-
getY
public int getY()
-
getButton
public int getButton()
Which button was pressed, either LEFT, CENTER, or RIGHT.
-
getClickCount
@Deprecated public int getClickCount()
Deprecated.Do not use, getCount() is the correct method.
-
getAmount
@Deprecated public float getAmount()
Deprecated.Do not use, getCount() is the correct method.
-
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.
-
-