MouseEventNameMouseEvent
DescriptionMouse events are generated when the user moves and clicks the mouse. Class Definition
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); } ConstantsMOUSE_CLICKEDpublic final static int MOUSE_CLICKEDAn event type ID indicating a mouse click. MOUSE_DRAGGEDpublic final static int MOUSE_DRAGGEDAn event type ID indicating a mouse move with the button held down. MOUSE_ENTEREDpublic final static int MOUSE_ENTEREDAn event type ID indicating that a mouse entered a component. MOUSE_EXITEDpublic final static int MOUSE_EXITEDAn event type ID indicating that a mouse left a component. MOUSE_FIRSTpublic final static int MOUSE_FIRSTSpecifies the beginning range of mouse event ID values. MOUSE_LASTpublic final static int MOUSE_LASTSpecifies the ending range of mouse event ID values. MOUSE_MOVEDpublic final static int MOUSE_MOVEDAn event type ID indicating a mouse move. MOUSE_PRESSEDpublic final static int MOUSE_PRESSEDAn event type ID indicating a mouse button press. MOUSE_RELEASEDpublic final static int MOUSE_RELEASEDAn event type ID indicating a mouse button release. ConstructorsMouseEventpublic MouseEvent (Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
Instance MethodsgetClickCountpublic int getClickCount()
getPointpublic synchronized Point getPoint()
getXpublic int getX()
getYpublic int getY()
isPopupTriggerpublic boolean isPopupTrigger()
paramStringpublic String paramString()
translatePointpublic synchronized void translatePoint (int x, int y)
See AlsoComponent, ComponentEvent, InputEvent, MouseAdapter, MouseListener, Point |
|