Mouse events are generated when the user moves and clicks the mouse.
public class java.awt.event.MouseEvent extends java.awt.event.InputEvent { // Constants public final static int MOUSE_CLICKED; public final static int MOUSE_DRAGGED; public final static int MOUSE_ENTERED; public final static int MOUSE_EXITED; public final static int MOUSE_FIRST; public final static int MOUSE_LAST; public final static int MOUSE_MOVED; public final static int MOUSE_PRESSED; public final static int MOUSE_RELEASED; // Constructors public MouseEvent (Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger); // Instance Methods public int getClickCount(); public synchronized Point getPoint(); public int getX(); public int getY(); public boolean isPopupTrigger(); public String paramString(); public synchronized void translatePoint (int x, int y); }
An event type ID indicating a mouse click.
An event type ID indicating a mouse move with the button held down.
An event type ID indicating that a mouse entered a component.
An event type ID indicating that a mouse left a component.
Specifies the beginning range of mouse event ID values.
Specifies the ending range of mouse event ID values.
An event type ID indicating a mouse move.
An event type ID indicating a mouse button press.
An event type ID indicating a mouse button release.
The object that generated the event.
The event type ID of the event.
When the event occurred, in milliseconds from the epoch.
What modifier keys were pressed with this key.
The horizontal location of the event.
The vertical location of the event.
The number of times the mouse button has been clicked.
A flag indicating if this event is a popup trigger event.
Constructs a MouseEvent with the given characteristics.
The number of consecutive mouse button clicks for this event.
The location where the event happened.
The horizontal location where the event happened.
The vertical location where the event happened.
Returns true if this event is the popup menu event for the run-time system.
String with current settings of the MouseEvent.
ComponentEvent.paramString()
Helper method for toString() to generate string of current settings.
The horizontal amount of translation.
The vertical amount of translation.
Translates the location of the event by the given amounts.
Component, ComponentEvent, InputEvent, MouseAdapter, MouseListener, Point