public class GWindowEvent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
KEY_PRESSED |
static int |
KEY_RELEASED |
static int |
MOUSE_DRAGGED |
static int |
MOUSE_PRESSED |
static int |
MOUSE_RELEASED |
static int |
TIMER_EXPIRED |
Constructor and Description |
---|
GWindowEvent(int x,
int y,
char key,
int type)
Create a new GWindowEvent.
|
Modifier and Type | Method and Description |
---|---|
char |
getKey()
Answer the key that was pressed.
|
int |
getType()
Answer the type of this event.
|
int |
getX()
Answer the x position of the mouse click.
|
int |
getY()
Answer the y position of the mouse click.
|
java.lang.String |
toString() |
public static final int MOUSE_PRESSED
public static final int MOUSE_RELEASED
public static final int MOUSE_DRAGGED
public static final int KEY_PRESSED
public static final int KEY_RELEASED
public static final int TIMER_EXPIRED
public GWindowEvent(int x, int y, char key, int type)
x
- the x location of a mouse pressy
- the y location of a mouse presskey
- the character pressed on the keyboardtype
- the kind of event.public int getType()
public char getKey()
public int getX()
public int getY()
public java.lang.String toString()
toString
in class java.lang.Object