MouseEvent

Instances of this class are sent whenever mouse related actions occur. This includes mouse buttons being pressed and released, the mouse pointer being moved and the mouse pointer crossing widget boundaries. <p> Note: The <code>button</code> field is an integer that represents the mouse button number. This is not the same as the <code>SWT</code> mask constants <code>BUTTONx</code>. </p>

@see MouseListener @see MouseMoveListener @see MouseTrackListener @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

Constructors

this
this(Event e)

Constructs a new instance of this class based on the information in the given untyped event.

Members

Functions

toString
String toString()

Returns a string containing a concise, human-readable description of the receiver.

Variables

button
int button;

the button that was pressed or released; 1 for the first button, 2 for the second button, and 3 for the third button, etc.

count
int count;

the number times the mouse has been clicked, as defined by the operating system; 1 for the first click, 2 for the second click and so on.

stateMask
int stateMask;

the state of the keyboard modifier keys at the time the event was generated

x
int x;

the widget-relative, x coordinate of the pointer at the time the mouse button was pressed or released

y
int y;

the widget-relative, y coordinate of the pointer at the time the mouse button was pressed or released

Inherited Members

From TypedEvent

display
Display display;

the display where the event occurred

widget
Widget widget;

the widget that issued the event

time
int time;

the time that the event occurred.

data
Object data;

a field for application use

getName
String getName()

Returns the name of the event. This is the name of the class without the module name.

toString
String toString()

Returns a string containing a concise, human-readable description of the receiver.

Meta