|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Event
Unsafe:
Field Summary | |
static int |
ACTION_EVENT
Enabled: This event indicates that the user wants some action to occur. |
private static int[][] |
actionKeyCodes
|
static int |
ALT_MASK
Enabled: This flag indicates that the Alt key was down when the event occurred. |
Object |
arg
Suppressed: An arbitrary argument of the event. |
static int |
BACK_SPACE
Enabled: The BackSpace key. |
static int |
CAPS_LOCK
Enabled: The Caps Lock key, a non-ASCII action key. |
int |
clickCount
Suppressed: For MOUSE_DOWN events, this field indicates the
number of consecutive clicks. |
private boolean |
consumed
This field controls whether or not the event is sent back down to the peer once the target has processed it - false means it's sent to the peer, true means it's not. |
static int |
CTRL_MASK
Enabled: This flag indicates that the Control key was down when the event occurred. |
private long |
data
|
static int |
DELETE
Enabled: The Delete key. |
static int |
DOWN
Enabled: The Down Arrow key, a non-ASCII action key. |
static int |
END
Enabled: The End key, a non-ASCII action key. |
static int |
ENTER
Enabled: The Enter key. |
static int |
ESCAPE
Enabled: The Escape key. |
Event |
evt
Suppressed: The next event. |
static int |
F1
Enabled: The F1 function key, a non-ASCII action key. |
static int |
F10
Enabled: The F10 function key, a non-ASCII action key. |
static int |
F11
Enabled: The F11 function key, a non-ASCII action key. |
static int |
F12
Enabled: The F12 function key, a non-ASCII action key. |
static int |
F2
Enabled: The F2 function key, a non-ASCII action key. |
static int |
F3
Enabled: The F3 function key, a non-ASCII action key. |
static int |
F4
Enabled: The F4 function key, a non-ASCII action key. |
static int |
F5
Enabled: The F5 function key, a non-ASCII action key. |
static int |
F6
Enabled: The F6 function key, a non-ASCII action key. |
static int |
F7
Enabled: The F7 function key, a non-ASCII action key. |
static int |
F8
Enabled: The F8 function key, a non-ASCII action key. |
static int |
F9
Enabled: The F9 function key, a non-ASCII action key. |
static int |
GOT_FOCUS
Enabled: A component gained the focus. |
static int |
HOME
Enabled: The Home key, a non-ASCII action key. |
int |
id
Suppressed: Indicates which type of event the event is, and which other Event variables are relevant for the event. |
static int |
INSERT
Enabled: The Insert key, a non-ASCII action key. |
int |
key
Suppressed: The key code of the key that was pressed in a keyboard event. |
static int |
KEY_ACTION
Enabled: The user has pressed a non-ASCII action key. |
static int |
KEY_ACTION_RELEASE
Enabled: The user has released a non-ASCII action key. |
private static int |
KEY_EVENT
|
static int |
KEY_PRESS
Enabled: The user has pressed a normal key. |
static int |
KEY_RELEASE
Enabled: The user has released a normal key. |
static int |
LEFT
Enabled: The Left Arrow key, a non-ASCII action key. |
static int |
LIST_DESELECT
Enabled: An item in a list has been deselected. |
private static int |
LIST_EVENT
|
static int |
LIST_SELECT
Enabled: An item in a list has been selected. |
static int |
LOAD_FILE
Enabled: A file loading event. |
static int |
LOST_FOCUS
Enabled: A component lost the focus. |
static int |
META_MASK
Enabled: This flag indicates that the Meta key was down when the event occurred. |
private static int |
MISC_EVENT
|
int |
modifiers
Suppressed: The state of the modifier keys. |
static int |
MOUSE_DOWN
Enabled: The user has pressed the mouse button. |
static int |
MOUSE_DRAG
Enabled: The user has moved the mouse with a button pressed. |
static int |
MOUSE_ENTER
Enabled: The mouse has entered a component. |
private static int |
MOUSE_EVENT
|
static int |
MOUSE_EXIT
Enabled: The mouse has exited a component. |
static int |
MOUSE_MOVE
Enabled: The mouse has moved with no button pressed. |
static int |
MOUSE_UP
Enabled: The user has released the mouse button. |
static int |
NUM_LOCK
Enabled: The Num Lock key, a non-ASCII action key. |
static int |
PAUSE
Enabled: The Pause key, a non-ASCII action key. |
static int |
PGDN
Enabled: The Page Down key, a non-ASCII action key. |
static int |
PGUP
Enabled: The Page Up key, a non-ASCII action key. |
static int |
PRINT_SCREEN
Enabled: The Print Screen key, a non-ASCII action key. |
static int |
RIGHT
Enabled: The Right Arrow key, a non-ASCII action key. |
static int |
SAVE_FILE
Enabled: A file saving event. |
static int |
SCROLL_ABSOLUTE
Enabled: The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion. |
static int |
SCROLL_BEGIN
Enabled: The scroll begin event. |
static int |
SCROLL_END
Enabled: The scroll end event. |
private static int |
SCROLL_EVENT
|
static int |
SCROLL_LINE_DOWN
Enabled: The user has activated the line down area of a scroll bar. |
static int |
SCROLL_LINE_UP
Enabled: The user has activated the line up area of a scroll bar. |
static int |
SCROLL_LOCK
Enabled: The Scroll Lock key, a non-ASCII action key. |
static int |
SCROLL_PAGE_DOWN
Enabled: The user has activated the page down area of a scroll bar. |
static int |
SCROLL_PAGE_UP
Enabled: The user has activated the page up area of a scroll bar. |
private static long |
serialVersionUID
|
static int |
SHIFT_MASK
Enabled: This flag indicates that the Shift key was down when the event occurred. |
static int |
TAB
Enabled: The Tab key. |
Object |
target
Suppressed: The target component. |
static int |
UP
Enabled: The Up Arrow key, a non-ASCII action key. |
long |
when
Suppressed: The time stamp. |
static int |
WINDOW_DEICONIFY
Enabled: The user has asked the window manager to de-iconify the window. |
static int |
WINDOW_DESTROY
Enabled: The user has asked the window manager to kill the window. |
private static int |
WINDOW_EVENT
|
static int |
WINDOW_EXPOSE
Enabled: The user has asked the window manager to expose the window. |
static int |
WINDOW_ICONIFY
Enabled: The user has asked the window manager to iconify the window. |
static int |
WINDOW_MOVED
Enabled: The user has asked the window manager to move the window. |
int |
x
Suppressed: The x coordinate of the event. |
int |
y
Suppressed: The y coordinate of the event. |
Constructor Summary | |
Event(Object target,
int id,
Object arg)
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
|
Event(Object target,
long when,
int id,
int x,
int y,
int key,
int modifiers)
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
|
Event(Object target,
long when,
int id,
int x,
int y,
int key,
int modifiers,
Object arg)
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
Method Summary | |
(package private) void |
consume()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
boolean |
controlDown()
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
(package private) char |
getKeyEventChar()
|
(package private) static int |
getOldEventKey(KeyEvent e)
|
private static void |
initIDs()
Initialize JNI field and method IDs for fields that may be accessed from C. |
(package private) boolean |
isConsumed()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
boolean |
metaDown()
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
protected String |
paramString()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
boolean |
shiftDown()
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
String |
toString()
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
void |
translate(int x,
int y)
Suppressed: NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private transient long data
public static final int SHIFT_MASK
public static final int CTRL_MASK
public static final int META_MASK
public static final int ALT_MASK
public static final int HOME
public static final int END
public static final int PGUP
public static final int PGDN
public static final int UP
public static final int DOWN
public static final int LEFT
public static final int RIGHT
public static final int F1
public static final int F2
public static final int F3
public static final int F4
public static final int F5
public static final int F6
public static final int F7
public static final int F8
public static final int F9
public static final int F10
public static final int F11
public static final int F12
public static final int PRINT_SCREEN
public static final int SCROLL_LOCK
public static final int CAPS_LOCK
public static final int NUM_LOCK
public static final int PAUSE
public static final int INSERT
public static final int ENTER
public static final int BACK_SPACE
public static final int TAB
public static final int ESCAPE
public static final int DELETE
private static final int WINDOW_EVENT
public static final int WINDOW_DESTROY
public static final int WINDOW_EXPOSE
public static final int WINDOW_ICONIFY
public static final int WINDOW_DEICONIFY
public static final int WINDOW_MOVED
private static final int KEY_EVENT
public static final int KEY_PRESS
public static final int KEY_RELEASE
public static final int KEY_ACTION
key
field contains a value that indicates
that the event occurred on one of the action keys, which
comprise the 12 function keys, the arrow (cursor) keys,
Page Up, Page Down, Home, End, Print Screen, Scroll Lock,
Caps Lock, Num Lock, Pause, and Insert.
public static final int KEY_ACTION_RELEASE
key
field contains a value that indicates
that the event occurred on one of the action keys, which
comprise the 12 function keys, the arrow (cursor) keys,
Page Up, Page Down, Home, End, Print Screen, Scroll Lock,
Caps Lock, Num Lock, Pause, and Insert.
private static final int MOUSE_EVENT
public static final int MOUSE_DOWN
ALT_MASK
flag indicates that the middle button has been pressed.
The META_MASK
flag indicates that the
right button has been pressed.
java.awt.Event#ALT_MASK
,
java.awt.Event#META_MASK
public static final int MOUSE_UP
ALT_MASK
flag indicates that the middle button has been released.
The META_MASK
flag indicates that the
right button has been released.
java.awt.Event#ALT_MASK
,
java.awt.Event#META_MASK
public static final int MOUSE_MOVE
public static final int MOUSE_ENTER
public static final int MOUSE_EXIT
public static final int MOUSE_DRAG
ALT_MASK
flag indicates that the middle
button is being pressed. The META_MASK
flag indicates
that the right button is being pressed.
java.awt.Event#ALT_MASK
,
java.awt.Event#META_MASK
private static final int SCROLL_EVENT
public static final int SCROLL_LINE_UP
public static final int SCROLL_LINE_DOWN
public static final int SCROLL_PAGE_UP
public static final int SCROLL_PAGE_DOWN
public static final int SCROLL_ABSOLUTE
public static final int SCROLL_BEGIN
public static final int SCROLL_END
private static final int LIST_EVENT
public static final int LIST_SELECT
public static final int LIST_DESELECT
private static final int MISC_EVENT
public static final int ACTION_EVENT
public static final int LOAD_FILE
public static final int SAVE_FILE
public static final int GOT_FOCUS
public static final int LOST_FOCUS
public Object target
java.awt.AWTEvent#getSource()
public long when
java.awt.event.InputEvent#getWhen()
public int id
Event
variables are relevant for the event.
This has been replaced by AWTEvent.getID()
java.awt.AWTEvent#getID()
public int x
java.awt.event.MouseEvent#getX()
public int y
java.awt.event.MouseEvent#getY()
public int key
java.awt.event.KeyEvent#getKeyCode()
public int modifiers
java.awt.event.InputEvent#getModifiers()
public int clickCount
MOUSE_DOWN
events, this field indicates the
number of consecutive clicks. For other events, its value is
0
.
This field has been replaced by MouseEvent.getClickCount().
java.awt.event.MouseEvent#getClickCount().
public Object arg
arg
has been replaced by event specific property.
public Event evt
java.awt.EventQueue
private static final int[][] actionKeyCodes
private boolean consumed
isConsumed()
private static final long serialVersionUID
Constructor Detail |
public Event(Object target, long when, int id, int x, int y, int key, int modifiers, Object arg)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
with the specified target
component, time stamp, event type, x and y
coordinates, keyboard key, state of the modifier keys, and
argument.
target
- the target component.when
- the time stamp.id
- the event type.x
- the x coordinate.y
- the y coordinate.key
- the key pressed in a keyboard event.modifiers
- the state of the modifier keys.arg
- the specified argument.public Event(Object target, long when, int id, int x, int y, int key, int modifiers)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
, with the specified target
component, time stamp, event type, x and y
coordinates, keyboard key, state of the modifier keys, and an
argument set to null
.
target
- the target component.when
- the time stamp.id
- the event type.x
- the x coordinate.y
- the y coordinate.key
- the key pressed in a keyboard event.modifiers
- the state of the modifier keys.public Event(Object target, int id, Object arg)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
with the specified
target component, event type, and argument.
target
- the target component.id
- the event type.arg
- the specified argument.Method Detail |
private static void initIDs()
public void translate(int x, int y)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Translates this event so that its x and y coordinates are increased by dx and dy, respectively.
This method translates an event relative to the given component. This involves, at a minimum, translating the coordinates into the local coordinate system of the given component. It may also involve translating a region in the case of an expose event.
public boolean shiftDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Shift key is down.
true
if the key is down;
false
otherwise.java.awt.Event#modifiers
,
java.awt.Event#controlDown
,
java.awt.Event#metaDown
public boolean controlDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Control key is down.
true
if the key is down;
false
otherwise.java.awt.Event#modifiers
,
java.awt.Event#shiftDown
,
java.awt.Event#metaDown
public boolean metaDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Meta key is down.
true
if the key is down;
false
otherwise.java.awt.Event#modifiers
,
java.awt.Event#shiftDown
,
java.awt.Event#controlDown
void consume()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
boolean isConsumed()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
static int getOldEventKey(KeyEvent e)
char getKeyEventChar()
protected String paramString()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Returns a string representing the state of this Event
.
This method is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not be
null
.
public String toString()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Returns a representation of this event's values as a string.
toString
in class Object
java.awt.Event#paramString
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |