Example usage for Java java.awt.event MouseEvent fields, constructors, methods, implement or subclass
The text is from its open source code.
int | MOUSE_CLICKED The "mouse clicked" event. |
int | MOUSE_PRESSED The "mouse pressed" event. |
int | MOUSE_RELEASED The "mouse released" event. |
int | MOUSE_MOVED The "mouse moved" event. |
int | MOUSE_ENTERED The "mouse entered" event. |
int | MOUSE_EXITED The "mouse exited" event. |
int | MOUSE_DRAGGED The "mouse dragged" event. |
int | MOUSE_WHEEL The "mouse wheel" event. |
int | NOBUTTON Indicates no mouse buttons; used by #getButton . |
int | BUTTON1 Indicates mouse button #1; used by #getButton . |
int | BUTTON2 Indicates mouse button #2; used by #getButton . |
int | BUTTON3 Indicates mouse button #3; used by #getButton . |
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button) Constructs a MouseEvent object with the specified source component, type, time, modifiers, coordinates, absolute coordinates, click count, popupTrigger flag, and button number. | |
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, click count, and popupTrigger flag. | |
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) Constructs a MouseEvent object with the specified source component, type, time, modifiers, coordinates, click count, popupTrigger flag, and button number. |
void | consume() Consumes this event so that it will not be processed in the default manner by the source which originated it. |
int | getButton() Returns which, if any, of the mouse buttons has changed state. |
int | getClickCount() Returns the number of mouse clicks associated with this event. |
Component | getComponent() Returns the originator of the event. |
int | getID() Returns the event type. |
Point | getLocationOnScreen() Returns the absolute x, y position of the event. |
int | getModifiers() Returns the modifier mask for this event. |
int | getModifiersEx() |
String | getMouseModifiersText(int modifiers) Returns a String instance describing the modifier keys and mouse buttons that were down during the event, such as "Shift", or "Ctrl+Shift". |
Point | getPoint() Returns the x,y position of the event relative to the source component. |
Object | getSource() The object on which the Event initially occurred. |
long | getWhen() Returns the difference in milliseconds between the timestamp of when this event occurred and midnight, January 1, 1970 UTC. |
int | getX() Returns the horizontal x position of the event relative to the source component. |
int | getXOnScreen() Returns the absolute horizontal x position of the event. |
int | getY() Returns the vertical y position of the event relative to the source component. |
int | getYOnScreen() Returns the absolute vertical y position of the event. |
int | hashCode() Returns a hash code value for the object. |
boolean | isAltDown() Returns whether or not the Alt modifier is down on this event. |
boolean | isConsumed() Returns whether or not this event has been consumed. |
boolean | isControlDown() Returns whether or not the Control modifier is down on this event. |
boolean | isMetaDown() Returns whether or not the Meta modifier is down on this event. |
boolean | isPopupTrigger() Returns whether or not this mouse event is the popup menu trigger event for the platform. |
boolean | isShiftDown() Returns whether or not the Shift modifier is down on this event. |
String | paramString() Returns a parameter string identifying this event. |
String | toString() Returns a String representation of this object. |
void | translatePoint(int x, int y) Translates the event's coordinates to a new position by adding specified x (horizontal) and y (vertical) offsets. |