NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent 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, the Event 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 other Event variables are relevant for the event.
For keyboard events, key contains a value indicating which key was activated, and modifiers contains the modifiers for that event. For the KEY_PRESS and KEY_RELEASE event ids, the value of key is the unicode character code for the key. For KEY_ACTION and KEY_ACTION_RELEASE, the value of key is one of the defined action-key identifiers in the Event class (PGUP, PGDN, F1, F2, etc).
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent 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, the Event 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 other Event variables are relevant for the event. For keyboard events, key contains a value indicating which key was activated, and modifiers contains the modifiers for that event. For the KEY_PRESS and KEY_RELEASE event ids, the value of key is the unicode character code for the key. For KEY_ACTION and KEY_ACTION_RELEASE, the value of key is one of the defined action-key identifiers in the Event class (PGUP, PGDN, F1, F2, etc).
Static Constant.
This event indicates that the user wants some action to occur.
type: int
Static Constant. This event indicates that the user wants some action to occur. type: int
Static Constant.
This flag indicates that the Alt key was down when the event occurred. For mouse events, this flag indicates that the middle mouse button was pressed or released.
type: int
Static Constant. This flag indicates that the Alt key was down when the event occurred. For mouse events, this flag indicates that the middle mouse button was pressed or released. type: int
Static Constant.
The BackSpace key.
type: int
Static Constant. The BackSpace key. type: int
Static Constant.
The Caps Lock key, a non-ASCII action key.
type: int
Static Constant. The Caps Lock key, a non-ASCII action key. type: int
Static Constant.
This flag indicates that the Control key was down when the event occurred.
type: int
Static Constant. This flag indicates that the Control key was down when the event occurred. type: int
Static Constant.
The Delete key.
type: int
Static Constant. The Delete key. type: int
Static Constant.
The Down Arrow key, a non-ASCII action key.
type: int
Static Constant. The Down Arrow key, a non-ASCII action key. type: int
Static Constant.
The End key, a non-ASCII action key.
type: int
Static Constant. The End key, a non-ASCII action key. type: int
Static Constant.
The Enter key.
type: int
Static Constant. The Enter key. type: int
Static Constant.
The Escape key.
type: int
Static Constant. The Escape key. type: int
Static Constant.
The F1 function key, a non-ASCII action key.
type: int
Static Constant. The F1 function key, a non-ASCII action key. type: int
Static Constant.
The F10 function key, a non-ASCII action key.
type: int
Static Constant. The F10 function key, a non-ASCII action key. type: int
Static Constant.
The F11 function key, a non-ASCII action key.
type: int
Static Constant. The F11 function key, a non-ASCII action key. type: int
Static Constant.
The F12 function key, a non-ASCII action key.
type: int
Static Constant. The F12 function key, a non-ASCII action key. type: int
Static Constant.
The F2 function key, a non-ASCII action key.
type: int
Static Constant. The F2 function key, a non-ASCII action key. type: int
Static Constant.
The F3 function key, a non-ASCII action key.
type: int
Static Constant. The F3 function key, a non-ASCII action key. type: int
Static Constant.
The F4 function key, a non-ASCII action key.
type: int
Static Constant. The F4 function key, a non-ASCII action key. type: int
Static Constant.
The F5 function key, a non-ASCII action key.
type: int
Static Constant. The F5 function key, a non-ASCII action key. type: int
Static Constant.
The F6 function key, a non-ASCII action key.
type: int
Static Constant. The F6 function key, a non-ASCII action key. type: int
Static Constant.
The F7 function key, a non-ASCII action key.
type: int
Static Constant. The F7 function key, a non-ASCII action key. type: int
Static Constant.
The F8 function key, a non-ASCII action key.
type: int
Static Constant. The F8 function key, a non-ASCII action key. type: int
Static Constant.
The F9 function key, a non-ASCII action key.
type: int
Static Constant. The F9 function key, a non-ASCII action key. type: int
Static Constant.
A component gained the focus.
type: int
Static Constant. A component gained the focus. type: int
Static Constant.
The Home key, a non-ASCII action key.
type: int
Static Constant. The Home key, a non-ASCII action key. type: int
Static Constant.
The Insert key, a non-ASCII action key.
type: int
Static Constant. The Insert key, a non-ASCII action key. type: int
Static Constant.
The user has pressed a non-ASCII action key. The 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.
type: int
Static Constant. The user has pressed a non-ASCII action key. The 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. type: int
Static Constant.
The user has released a non-ASCII action key. The 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.
type: int
Static Constant. The user has released a non-ASCII action key. The 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. type: int
Static Constant.
The user has pressed a normal key.
type: int
Static Constant. The user has pressed a normal key. type: int
Static Constant.
The user has released a normal key.
type: int
Static Constant. The user has released a normal key. type: int
Static Constant.
The Left Arrow key, a non-ASCII action key.
type: int
Static Constant. The Left Arrow key, a non-ASCII action key. type: int
Static Constant.
An item in a list has been deselected.
type: int
Static Constant. An item in a list has been deselected. type: int
Static Constant.
An item in a list has been selected.
type: int
Static Constant. An item in a list has been selected. type: int
Static Constant.
A file loading event.
type: int
Static Constant. A file loading event. type: int
Static Constant.
A component lost the focus.
type: int
Static Constant. A component lost the focus. type: int
Static Constant.
This flag indicates that the Meta key was down when the event occurred. For mouse events, this flag indicates that the right button was pressed or released.
type: int
Static Constant. This flag indicates that the Meta key was down when the event occurred. For mouse events, this flag indicates that the right button was pressed or released. type: int
Static Constant.
The user has pressed the mouse button. The ALT_MASK flag indicates that the middle button has been pressed. The META_MASKflag indicates that the right button has been pressed.
type: int
Static Constant. The user has pressed the mouse button. The ALT_MASK flag indicates that the middle button has been pressed. The META_MASKflag indicates that the right button has been pressed. type: int
Static Constant.
The user has moved the mouse with a button pressed. The ALT_MASK flag indicates that the middle button is being pressed. The META_MASK flag indicates that the right button is being pressed.
type: int
Static Constant. The user has moved the mouse with a button pressed. The ALT_MASK flag indicates that the middle button is being pressed. The META_MASK flag indicates that the right button is being pressed. type: int
Static Constant.
The mouse has entered a component.
type: int
Static Constant. The mouse has entered a component. type: int
Static Constant.
The mouse has exited a component.
type: int
Static Constant. The mouse has exited a component. type: int
Static Constant.
The mouse has moved with no button pressed.
type: int
Static Constant. The mouse has moved with no button pressed. type: int
Static Constant.
The user has released the mouse button. The ALT_MASK flag indicates that the middle button has been released. The META_MASKflag indicates that the right button has been released.
type: int
Static Constant. The user has released the mouse button. The ALT_MASK flag indicates that the middle button has been released. The META_MASKflag indicates that the right button has been released. type: int
Static Constant.
The Num Lock key, a non-ASCII action key.
type: int
Static Constant. The Num Lock key, a non-ASCII action key. type: int
Static Constant.
The Pause key, a non-ASCII action key.
type: int
Static Constant. The Pause key, a non-ASCII action key. type: int
Static Constant.
The Page Down key, a non-ASCII action key.
type: int
Static Constant. The Page Down key, a non-ASCII action key. type: int
Static Constant.
The Page Up key, a non-ASCII action key.
type: int
Static Constant. The Page Up key, a non-ASCII action key. type: int
Static Constant.
The Print Screen key, a non-ASCII action key.
type: int
Static Constant. The Print Screen key, a non-ASCII action key. type: int
Static Constant.
The Right Arrow key, a non-ASCII action key.
type: int
Static Constant. The Right Arrow key, a non-ASCII action key. type: int
Static Constant.
A file saving event.
type: int
Static Constant. A file saving event. type: int
Static Constant.
The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last position.
type: int
Static Constant. The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last position. type: int
Static Constant.
The scroll begin event.
type: int
Static Constant. The scroll begin event. type: int
Static Constant.
The scroll end event.
type: int
Static Constant. The scroll end event. type: int
Static Constant.
The user has activated the line down area of a scroll bar.
type: int
Static Constant. The user has activated the line down area of a scroll bar. type: int
Static Constant.
The user has activated the line up area of a scroll bar.
type: int
Static Constant. The user has activated the line up area of a scroll bar. type: int
Static Constant.
The Scroll Lock key, a non-ASCII action key.
type: int
Static Constant. The Scroll Lock key, a non-ASCII action key. type: int
Static Constant.
The user has activated the page down area of a scroll bar.
type: int
Static Constant. The user has activated the page down area of a scroll bar. type: int
Static Constant.
The user has activated the page up area of a scroll bar.
type: int
Static Constant. The user has activated the page up area of a scroll bar. type: int
Static Constant.
This flag indicates that the Shift key was down when the event occurred.
type: int
Static Constant. This flag indicates that the Shift key was down when the event occurred. type: int
Static Constant.
The Tab key.
type: int
Static Constant. The Tab key. type: int
Static Constant.
The Up Arrow key, a non-ASCII action key.
type: int
Static Constant. The Up Arrow key, a non-ASCII action key. type: int
Static Constant.
The user has asked the window manager to de-iconify the window.
type: int
Static Constant. The user has asked the window manager to de-iconify the window. type: int
Static Constant.
The user has asked the window manager to kill the window.
type: int
Static Constant. The user has asked the window manager to kill the window. type: int
Static Constant.
The user has asked the window manager to expose the window.
type: int
Static Constant. The user has asked the window manager to expose the window. type: int
Static Constant.
The user has asked the window manager to iconify the window.
type: int
Static Constant. The user has asked the window manager to iconify the window. type: int
Static Constant.
The user has asked the window manager to move the window.
type: int
Static Constant. The user has asked the window manager to move the window. type: int
(->event target id arg)
(->event target when id x y key modifiers)
(->event target when id x y key modifiers arg)
Constructor.
NOTE: The Event class is obsolete and is available only for backwards compatibility. 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. - java.lang.Object
when - the time stamp. - long
id - the event type. - int
x - the x coordinate. - int
y - the y coordinate. - int
key - the key pressed in a keyboard event. - int
modifiers - the state of the modifier keys. - int
arg - the specified argument. - java.lang.Object
Constructor. NOTE: The Event class is obsolete and is available only for backwards compatibility. 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. - `java.lang.Object` when - the time stamp. - `long` id - the event type. - `int` x - the x coordinate. - `int` y - the y coordinate. - `int` key - the key pressed in a keyboard event. - `int` modifiers - the state of the modifier keys. - `int` arg - the specified argument. - `java.lang.Object`
(arg this)
Instance Field.
An arbitrary argument of the event. The value of this field depends on the type of event. arg has been replaced by event specific property.
type: java.lang.Object
Instance Field. An arbitrary argument of the event. The value of this field depends on the type of event. arg has been replaced by event specific property. type: java.lang.Object
(click-count this)
Instance Field.
For 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().
type: int
Instance Field. For 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(). type: int
(control-down this)
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses.
Checks if the Control key is down.
returns: true if the key is down;
false otherwise. - boolean
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses. Checks if the Control key is down. returns: true if the key is down; false otherwise. - `boolean`
(evt this)
Instance Field.
The next event. This field is set when putting events into a linked list. This has been replaced by EventQueue.
type: java.awt.Event
Instance Field. The next event. This field is set when putting events into a linked list. This has been replaced by EventQueue. type: java.awt.Event
(id this)
Instance Field.
Indicates which type of event the event is, and which other Event variables are relevant for the event. This has been replaced by AWTEvent.getID()
type: int
Instance Field. Indicates which type of event the event is, and which other Event variables are relevant for the event. This has been replaced by AWTEvent.getID() type: int
(key this)
Instance Field.
The key code of the key that was pressed in a keyboard event. This has been replaced by KeyEvent.getKeyCode()
type: int
Instance Field. The key code of the key that was pressed in a keyboard event. This has been replaced by KeyEvent.getKeyCode() type: int
(meta-down this)
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses.
Checks if the Meta key is down.
returns: true if the key is down;
false otherwise. - boolean
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses. Checks if the Meta key is down. returns: true if the key is down; false otherwise. - `boolean`
(modifiers this)
Instance Field.
The state of the modifier keys. This is replaced with InputEvent.getModifiers() In java 1.1 MouseEvent and KeyEvent are subclasses of InputEvent.
type: int
Instance Field. The state of the modifier keys. This is replaced with InputEvent.getModifiers() In java 1.1 MouseEvent and KeyEvent are subclasses of InputEvent. type: int
(shift-down this)
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses.
Checks if the Shift key is down.
returns: true if the key is down;
false otherwise. - boolean
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses. Checks if the Shift key is down. returns: true if the key is down; false otherwise. - `boolean`
(target this)
Instance Field.
The target component. This indicates the component over which the event occurred or with which the event is associated. This object has been replaced by AWTEvent.getSource()
type: java.lang.Object
Instance Field. The target component. This indicates the component over which the event occurred or with which the event is associated. This object has been replaced by AWTEvent.getSource() type: java.lang.Object
(to-string this)
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses.
Returns a representation of this event's values as a string.
returns: a string that represents the event and the values
of its member fields. - java.lang.String
NOTE: The Event class is obsolete and is available only for backwards compatibility. It has been replaced by the AWTEvent class and its subclasses. Returns a representation of this event's values as a string. returns: a string that represents the event and the values of its member fields. - `java.lang.String`
(translate this dx dy)
NOTE: The Event class is obsolete and is available only for backwards compatibility. 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.
dx - the distance to translate the x coordinate. - int
dy - the distance to translate the y coordinate. - int
NOTE: The Event class is obsolete and is available only for backwards compatibility. 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. dx - the distance to translate the x coordinate. - `int` dy - the distance to translate the y coordinate. - `int`
(when this)
Instance Field.
The time stamp. Replaced by InputEvent.getWhen().
type: long
Instance Field. The time stamp. Replaced by InputEvent.getWhen(). type: long
(x this)
Instance Field.
The x coordinate of the event. Replaced by MouseEvent.getX()
type: int
Instance Field. The x coordinate of the event. Replaced by MouseEvent.getX() type: int
(y this)
Instance Field.
The y coordinate of the event. Replaced by MouseEvent.getY()
type: int
Instance Field. The y coordinate of the event. Replaced by MouseEvent.getY() type: int
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close