Package org.eclipse.draw2d
Class MouseEvent
java.lang.Object
java.util.EventObject
org.eclipse.draw2d.InputEvent
org.eclipse.draw2d.MouseEvent
- All Implemented Interfaces:
Serializable
An event caused by the user interacting with the mouse.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
The button that was pressed or released: {1, 2, 3}.int
The X coordinate of the mouse event.int
The Y coordinate of the mouse event.Fields inherited from class org.eclipse.draw2d.InputEvent
ALT, ANY_BUTTON, BUTTON1, BUTTON2, BUTTON3, BUTTON4, BUTTON5, CONTROL, SHIFT
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionMouseEvent
(int x, int y, EventDispatcher dispatcher, IFigure f, int button, int stateMask) Deprecated.MouseEvent
(EventDispatcher dispatcher, IFigure source, MouseEvent me) Constructs a new MouseEvent. -
Method Summary
Methods inherited from class org.eclipse.draw2d.InputEvent
consume, getState, isConsumed
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
x
public int xThe X coordinate of the mouse event. -
y
public int yThe Y coordinate of the mouse event. -
button
public int buttonThe button that was pressed or released: {1, 2, 3}.
-
-
Constructor Details
-
MouseEvent
Constructs a new MouseEvent.- Parameters:
dispatcher
- the event dispatchersource
- the source of the eventme
- an SWT mouse event used to supply the state mask, button and position- Since:
- 3.7
-
MouseEvent
Deprecated.Constructor for MouseEvent.- Parameters:
x
-y
-dispatcher
-f
-button
-stateMask
-- Since:
- 3.6
-
-
Method Details
-
getLocation
- Returns:
- the location of this mouse event
-
toString
- Overrides:
toString
in classEventObject
- See Also:
-
MouseEvent(EventDispatcher, IFigure, org.eclipse.swt.events.MouseEvent)
instead.