public class GGMouse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
enter
Mouse cursor enters the window.
|
static int |
idle
No mouse event occured.
|
static int |
lClick
Left mouse button down and up in a quick sequence.
|
static int |
lDClick
Left mouse button down, up, down, up in a quick sequence.
|
static int |
lDrag
Left mouse button down and move.
|
static int |
leave
Mouse cursor leaves the window.
|
static int |
lPress
Left mouse button down.
|
static int |
lRelease
Left mouse button up.
|
static int |
move
Mouse cursor is moved inside the window.
|
static int |
rClick
Right mouse button down and up in a quick sequence.
|
static int |
rDClick
Right mouse button down, up, down, up in a quick sequence.
|
static int |
rDrag
Right mouse button down and move.
|
static int |
rPress
Right mouse button down.
|
static int |
rRelease
Right mouse button up.
|
Modifier and Type | Method and Description |
---|---|
static GGMouse |
create()
Creates a GGMouse instance with default values for the instance variables.
|
static GGMouse |
create(GGMouseListener listener,
int evt,
int x,
int y)
Creates a GGMouse instance with given values for the instance variables.
|
int |
getEvent()
Retrieves the current event type as integer.
|
java.lang.String |
getEventType()
Returns the event type as string.
|
GGMouseListener |
getSource()
Retrieves the GGMouseListener reference that created the event.
|
int |
getX()
Retrieves the current x-coordinate of the mouse cursor with respect to the upper left corner
of the visible area in pixels.
|
int |
getY()
Retrieves the current y-coordinate of the mouse cursor with respect to the upper left corner
of the visible area in pixels.
|
public static final int idle
public static final int lPress
public static final int lRelease
public static final int lClick
public static final int lDClick
public static final int lDrag
public static final int rPress
public static final int rRelease
public static final int rClick
public static final int rDClick
public static final int rDrag
public static final int enter
public static final int leave
public static final int move
public static GGMouse create()
public static GGMouse create(GGMouseListener listener, int evt, int x, int y)
listener
- the listener instances that created the eventevt
- the event type (one of the predefined constants)x
- the x-coordinate where the event occurredy
- the y-coordinate where the event occurredpublic GGMouseListener getSource()
public int getEvent()
public int getX()
public java.lang.String getEventType()
public int getY()