Class java.awt.event.MouseEvent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.event.MouseEvent

Object
   |
   +----EventObject
           |
           +----AWTEvent
                   |
                   +----ComponentEvent
                           |
                           +----InputEvent
                                   |
                                   +----java.awt.event.MouseEvent

public class MouseEvent
extends InputEvent
The mouse event.

Version:
1.13 07/01/98
Author:
Carl Quinn

Variable Index

 o MOUSE_CLICKED
The mouse clicked event type.
 o MOUSE_DRAGGED
The mouse dragged event type.
 o MOUSE_ENTERED
The mouse entered event type.
 o MOUSE_EXITED
The mouse exited event type.
 o MOUSE_FIRST
Marks the first integer id for the range of mouse event ids.
 o MOUSE_LAST
Marks the last integer id for the range of mouse event ids.
 o MOUSE_MOVED
The mouse moved event type.
 o MOUSE_PRESSED
The mouse pressed event type.
 o MOUSE_RELEASED
The mouse released event type.

Constructor Index

 o java.awt.event.MouseEvent(Component, int, long, int, int, int, int, boolean)
Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.

Method Index

 o getClickCount()
Return the number of mouse clicks associated with this event.
 o getPoint()
Returns the x,y position of the event relative to the source component.
 o getX()
Returns the x position of the event relative to the source component.
 o getY()
Returns the y position of the event relative to the source component.
 o isPopupTrigger()
Returns whether or not this mouse event is the popup-menu trigger event for the platform.
 o paramString()
 o translatePoint(int, int)
Translates the coordinate position of the event by x, y.

Variables

 o MOUSE_CLICKED
public static final int MOUSE_CLICKED
The mouse clicked event type.

 o MOUSE_DRAGGED
public static final int MOUSE_DRAGGED
The mouse dragged event type.

 o MOUSE_ENTERED
public static final int MOUSE_ENTERED
The mouse entered event type.

 o MOUSE_EXITED
public static final int MOUSE_EXITED
The mouse exited event type.

 o MOUSE_FIRST
public static final int MOUSE_FIRST
Marks the first integer id for the range of mouse event ids.

 o MOUSE_LAST
public static final int MOUSE_LAST
Marks the last integer id for the range of mouse event ids.

 o MOUSE_MOVED
public static final int MOUSE_MOVED
The mouse moved event type.

 o MOUSE_PRESSED
public static final int MOUSE_PRESSED
The mouse pressed event type.

 o MOUSE_RELEASED
public static final int MOUSE_RELEASED
The mouse released event type.

Constructors

 o MouseEvent
public 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, and click count.

Parameters:
source - the object where the event originated

Methods

 o getClickCount
public int getClickCount()
Return the number of mouse clicks associated with this event.

 o getPoint
public java.awt.Point getPoint()
Returns the x,y position of the event relative to the source component.

 o getX
public int getX()
Returns the x position of the event relative to the source component.

 o getY
public int getY()
Returns the y position of the event relative to the source component.

 o isPopupTrigger
public boolean isPopupTrigger()
Returns whether or not this mouse event is the popup-menu trigger event for the platform.

 o paramString
public java.lang.String paramString()
Overrides:
paramString in class ComponentEvent
 o translatePoint
public synchronized void translatePoint(int x,
                                        int y)
Translates the coordinate position of the event by x, y.

Parameters:
x - the x value added to the current x coordinate position
y - the y value added to the current y coordinate position

All Packages  Class Hierarchy  This Package  Previous  Next  Index