- java.lang.Object
-
- java.awt.Event
-
- All Implemented Interfaces:
Serializable
@Deprecated(since="9") public class Event extends Object implements Serializable
Deprecated.It is recommended thatAWTEvent
and its subclasses be used insteadNOTE: TheEvent
class is obsolete and is available only for backwards compatibility. It has been replaced by theAWTEvent
class and its subclasses.Event
is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, theEvent
class is maintained only for backwards compatibility. The information in this class description is provided to assist programmers in converting Java 1.0 programs to the new event model.In the Java 1.0 event model, an event contains an
id
field that indicates what type of event it is and which otherEvent
variables are relevant for the event.For keyboard events,
key
contains a value indicating which key was activated, andmodifiers
contains the modifiers for that event. For the KEY_PRESS and KEY_RELEASE event ids, the value ofkey
is the unicode character code for the key. For KEY_ACTION and KEY_ACTION_RELEASE, the value ofkey
is one of the defined action-key identifiers in theEvent
class (PGUP
,PGDN
,F1
,F2
, etc).- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACTION_EVENT
Deprecated.This event indicates that the user wants some action to occur.static int
ALT_MASK
Deprecated.This flag indicates that the Alt key was down when the event occurred.Object
arg
Deprecated.An arbitrary argument of the event.static int
BACK_SPACE
Deprecated.The BackSpace key.static int
CAPS_LOCK
Deprecated.The Caps Lock key, a non-ASCII action key.int
clickCount
Deprecated.ForMOUSE_DOWN
events, this field indicates the number of consecutive clicks.static int
CTRL_MASK
Deprecated.This flag indicates that the Control key was down when the event occurred.static int
DELETE
Deprecated.The Delete key.static int
DOWN
Deprecated.The Down Arrow key, a non-ASCII action key.static int
END
Deprecated.The End key, a non-ASCII action key.static int
ENTER
Deprecated.The Enter key.static int
ESCAPE
Deprecated.The Escape key.Event
evt
Deprecated.The next event.static int
F1
Deprecated.The F1 function key, a non-ASCII action key.static int
F10
Deprecated.The F10 function key, a non-ASCII action key.static int
F11
Deprecated.The F11 function key, a non-ASCII action key.static int
F12
Deprecated.The F12 function key, a non-ASCII action key.static int
F2
Deprecated.The F2 function key, a non-ASCII action key.static int
F3
Deprecated.The F3 function key, a non-ASCII action key.static int
F4
Deprecated.The F4 function key, a non-ASCII action key.static int
F5
Deprecated.The F5 function key, a non-ASCII action key.static int
F6
Deprecated.The F6 function key, a non-ASCII action key.static int
F7
Deprecated.The F7 function key, a non-ASCII action key.static int
F8
Deprecated.The F8 function key, a non-ASCII action key.static int
F9
Deprecated.The F9 function key, a non-ASCII action key.static int
GOT_FOCUS
Deprecated.A component gained the focus.static int
HOME
Deprecated.The Home key, a non-ASCII action key.int
id
Deprecated.Indicates which type of event the event is, and which otherEvent
variables are relevant for the event.static int
INSERT
Deprecated.The Insert key, a non-ASCII action key.int
key
Deprecated.The key code of the key that was pressed in a keyboard event.static int
KEY_ACTION
Deprecated.The user has pressed a non-ASCII action key.static int
KEY_ACTION_RELEASE
Deprecated.The user has released a non-ASCII action key.static int
KEY_PRESS
Deprecated.The user has pressed a normal key.static int
KEY_RELEASE
Deprecated.The user has released a normal key.static int
LEFT
Deprecated.The Left Arrow key, a non-ASCII action key.static int
LIST_DESELECT
Deprecated.An item in a list has been deselected.static int
LIST_SELECT
Deprecated.An item in a list has been selected.static int
LOAD_FILE
Deprecated.A file loading event.static int
LOST_FOCUS
Deprecated.A component lost the focus.static int
META_MASK
Deprecated.This flag indicates that the Meta key was down when the event occurred.int
modifiers
Deprecated.The state of the modifier keys.static int
MOUSE_DOWN
Deprecated.The user has pressed the mouse button.static int
MOUSE_DRAG
Deprecated.The user has moved the mouse with a button pressed.static int
MOUSE_ENTER
Deprecated.The mouse has entered a component.static int
MOUSE_EXIT
Deprecated.The mouse has exited a component.static int
MOUSE_MOVE
Deprecated.The mouse has moved with no button pressed.static int
MOUSE_UP
Deprecated.The user has released the mouse button.static int
NUM_LOCK
Deprecated.The Num Lock key, a non-ASCII action key.static int
PAUSE
Deprecated.The Pause key, a non-ASCII action key.static int
PGDN
Deprecated.The Page Down key, a non-ASCII action key.static int
-