public class EventData extends Object
| Constructor and Description |
|---|
EventData() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
AWTEvent |
createAWTEvent()
Creates the corresponding AWT event from this event data.
|
int |
getButton()
Returns the button of the event.
|
int |
getClickCount()
Returns the click count of the event.
|
int |
getId()
Returns the event ID.
|
char |
getKeyChar()
Returns the key char for key events.
|
int |
getKeyCode()
Returns the key code for key events.
|
int |
getModifiers()
Returns the modifiers of the event.
|
Object |
getSource()
Returns the source of the event.
|
long |
getTime()
Returns the timestamp of the event.
|
Rectangle |
getUpdateRect()
Returns the update rectangle for paint events.
|
int |
getX()
Returns the X location of the event.
|
int |
getY()
Returns the Y location of the event.
|
boolean |
isPopup() |
void |
setButton(int b)
Sets the button of the event.
|
void |
setClickCount(int c)
Sets the click count of the event.
|
void |
setId(int id)
Sets the event id.
|
void |
setKeyChar(char keyChar)
Sets the key char for key events.
|
void |
setKeyCode(int keyCode)
Sets the key code for key events.
|
void |
setModifiers(int mods)
Sets the modifiers of the event.
|
void |
setPopup(boolean popup) |
void |
setSource(Object s)
Sets the event source.
|
void |
setTime(long t)
Sets the time of the event.
|
void |
setUpdateRect(Rectangle r)
Sets the update rectangle for paint events.
|
void |
setX(int x)
Sets the X location of the event.
|
void |
setY(int y)
Sets the Y location of the event.
|
public int getId()
public void setId(int id)
id - the id to setpublic Object getSource()
public void setSource(Object s)
s - the source to setpublic long getTime()
public void setTime(long t)
t - the time to setpublic int getModifiers()
public void setModifiers(int mods)
mods - the modifiers of the eventpublic int getX()
public void setX(int x)
x - the X location to setpublic int getY()
public void setY(int y)
y - the Y location to setpublic int getClickCount()
public void setClickCount(int c)
c - the clickCount to setpublic int getButton()
public void setButton(int b)
b - the button to setpublic boolean isPopup()
public void setPopup(boolean popup)
public Rectangle getUpdateRect()
public void setUpdateRect(Rectangle r)
r - the update rectangle to setpublic int getKeyCode()
public void setKeyCode(int keyCode)
keyCode - the key code to setpublic char getKeyChar()
public void setKeyChar(char keyChar)
keyChar - the key code to setpublic AWTEvent createAWTEvent()
public void clear()
Copyright © 2012. All Rights Reserved.