| sun.porting.toolkit.ToolkitEventHandler
ToolkitEventHandler | public interface ToolkitEventHandler (Code) | | ToolkitEventHandler
is the only interface that a toolkit presents to the underlying window
system. It is the means for delivering events up into the toolkit.
All of the other interactions between the window system and the toolkit are
in the other direction, i.e. the toolkit issues a directive and the window
system executes it.)
version: 1.12, 08/19/02 |
Field Summary | |
final int | ACTION_PRESSED Event ID for a press of special "non-keyboard" keys, like
a "GO" key on a remote control. | final int | ACTION_RELEASED Event ID for a release of special "non-keyboard" keys, like
a "GO" key on a remote control. | final int | KEY_EVENT_END Delimiting number: a key event will be less than KEY_EVENT_END. | final int | KEY_EVENT_START Delimiting number: a key event will be greater than KEY_EVENT_START. | final int | KEY_PRESSED Event ID for a key press corresponding to a typewriter-style keyboard. | final int | KEY_RELEASED Event ID for a key press corresponding to a typewriter-style keyboard. | final int | KEY_TYPED Event ID for an event indicating that a character was typed. | final int | POINTER_DRAGGED Event ID for a drag, i.e. | final int | POINTER_EVENT_END Delimiting number: a pointer event will be less than POINTER_EVENT_END. | final int | POINTER_EVENT_START Delimiting number: a pointer event will be greater than POINTER_EVENT_START. | final int | POINTER_MOVED Event ID for a position change. | final int | POINTER_PRESSED Event ID for a pointer press (i.e. | final int | POINTER_RELEASED Event ID for a pointer release (i.e. | final int | WINDOW_DAMAGED Event ID for indicating that a region of a window needs to be repainted. | final int | WINDOW_ENTERED Event ID for indicating that the pointing device has entered the window. | final int | WINDOW_EVENT_END Delimiting number: a window event will be less than WINDOW_EVENT_END. | final int | WINDOW_EVENT_START Delimiting number: a window event will be greater than WINDOW_EVENT_START. | final int | WINDOW_EXITED Event ID for indicating that the pointing device has left the window. | final int | WINDOW_GOT_FOCUS Event ID for indicating that a window has been assigned keyboard focus. | final int | WINDOW_INVISIBLE Event ID for indicating that a mapped window has been clipped and/or
completely covered by one or more other windows (this could include
its children). | final int | WINDOW_LOST_FOCUS Event ID for indicating that a window no longer has the keyboard focus. | final int | WINDOW_MAPPED Event ID for indicating that a window has been mapped (made visible). | final int | WINDOW_RESHAPED Event ID for indicating that a window has been reshaped (moved and/or
resized). | final int | WINDOW_UNMAPPED Event ID for indicating that a window has been unmapped (made invisible). |
Method Summary | |
void | keyboardEventOccurred(Window win, long when, int ID, int keycode, char keychar) Called by the window system in order to deliver a keyboard event. | void | pointerEventOccurred(Window w, long when, int x, int y, int ID, int number) Called by the window system in order to deliver a pointer event. | void | windowEventOccurred(Window win, long when, int x, int y, int w, int h, int ID) Called by the window system in order to deliver a window event.
Parameters: win - The window on which the event occurred. Parameters: when - Time at which the event occurred, in milliseconds since1/1/70 UTC. Parameters: x - x coordinate of position at which the event occurred. Parameters: y - y coordinate of position at which the event occurred. |
ACTION_PRESSED | final int ACTION_PRESSED(Code) | | Event ID for a press of special "non-keyboard" keys, like
a "GO" key on a remote control.
|
ACTION_RELEASED | final int ACTION_RELEASED(Code) | | Event ID for a release of special "non-keyboard" keys, like
a "GO" key on a remote control.
|
KEY_EVENT_END | final int KEY_EVENT_END(Code) | | Delimiting number: a key event will be less than KEY_EVENT_END.
(Note that this must be updated if new key events are added.)
|
KEY_EVENT_START | final int KEY_EVENT_START(Code) | | Delimiting number: a key event will be greater than KEY_EVENT_START.
|
KEY_PRESSED | final int KEY_PRESSED(Code) | | Event ID for a key press corresponding to a typewriter-style keyboard.
|
KEY_RELEASED | final int KEY_RELEASED(Code) | | Event ID for a key press corresponding to a typewriter-style keyboard.
|
KEY_TYPED | final int KEY_TYPED(Code) | | Event ID for an event indicating that a character was typed. This
event is only generated if the window system has taken responsiblity
for translating KEY_PRESSED/KEY_RELEASED events into characters.
|
POINTER_DRAGGED | final int POINTER_DRAGGED(Code) | | Event ID for a drag, i.e. a position change that occurs between
POINTER_PRESSED and POINTER_RELEASED. The window system is responsible
for delivering all drags to the same window that got the press, unless
the focus is explicitly redirected by the toolkit.
|
POINTER_EVENT_END | final int POINTER_EVENT_END(Code) | | Delimiting number: a pointer event will be less than POINTER_EVENT_END.
(Note that this must be updated if new pointer events are added.)
|
POINTER_EVENT_START | final int POINTER_EVENT_START(Code) | | Delimiting number: a pointer event will be greater than POINTER_EVENT_START.
|
POINTER_MOVED | final int POINTER_MOVED(Code) | | Event ID for a position change. This ID is used when the pointer is
being moved but no buttons (etc) are pressed, i.e. not a "drag" event.
|
POINTER_PRESSED | final int POINTER_PRESSED(Code) | | Event ID for a pointer press (i.e. a press associated with position
information, like a mouse click, touchscreen press, etc).
|
POINTER_RELEASED | final int POINTER_RELEASED(Code) | | Event ID for a pointer release (i.e. a press associated with position
information, like a mouse click, touchscreen press, etc). The window
system must guarantee that the release is delivered to the same window
that got the press, unless the focus was explicitly redirected by
the toolkit.
|
WINDOW_DAMAGED | final int WINDOW_DAMAGED(Code) | | Event ID for indicating that a region of a window needs to be repainted.
|
WINDOW_ENTERED | final int WINDOW_ENTERED(Code) | | Event ID for indicating that the pointing device has entered the window.
|
WINDOW_EVENT_END | final int WINDOW_EVENT_END(Code) | | Delimiting number: a window event will be less than WINDOW_EVENT_END.
(Note that this must be updated if new window events are added.)
|
WINDOW_EVENT_START | final int WINDOW_EVENT_START(Code) | | Delimiting number: a window event will be greater than WINDOW_EVENT_START.
|
WINDOW_EXITED | final int WINDOW_EXITED(Code) | | Event ID for indicating that the pointing device has left the window.
|
WINDOW_GOT_FOCUS | final int WINDOW_GOT_FOCUS(Code) | | Event ID for indicating that a window has been assigned keyboard focus.
|
WINDOW_INVISIBLE | final int WINDOW_INVISIBLE(Code) | | Event ID for indicating that a mapped window has been clipped and/or
completely covered by one or more other windows (this could include
its children). When the window is no longer completely invisible,
window system is expected to generate WINDOW_DAMAGED events for the
newly-visible portions of the window.)
WINDOW_INVISIBLE events must not be generated when the window is
unmapped.
The toolkit is allowed to use this event for optimization
purposes but must not depend on it, because it is optional.
|
WINDOW_LOST_FOCUS | final int WINDOW_LOST_FOCUS(Code) | | Event ID for indicating that a window no longer has the keyboard focus.
|
WINDOW_MAPPED | final int WINDOW_MAPPED(Code) | | Event ID for indicating that a window has been mapped (made visible).
The toolkit is allowed to use this event for optimization
purposes but must not depend on it, because it is optional.
|
WINDOW_RESHAPED | final int WINDOW_RESHAPED(Code) | | Event ID for indicating that a window has been reshaped (moved and/or
resized). For this event, {x, y, w, h} are DELTA VALUES, not absolute.
|
WINDOW_UNMAPPED | final int WINDOW_UNMAPPED(Code) | | Event ID for indicating that a window has been unmapped (made invisible).
The toolkit is allowed to use this event for optimization
purposes but must not depend on it, because it is optional.
|
keyboardEventOccurred | void keyboardEventOccurred(Window win, long when, int ID, int keycode, char keychar)(Code) | | Called by the window system in order to deliver a keyboard event.
Keyboard events are delivered to the window that currently has input
focus; whether this is the window that contains the pointer depends on
the focus policy implemented by the toolkit.
Parameters: win - The window to which the event is directed (the focus window). Parameters: when - Time at which the event occurred, in milliseconds since1/1/70 UTC. Parameters: ID - Type identifier indicating the kind of event Parameters: keycode - A code identifying which key was pressed. Parameters: keychar - Unicode character -- for KEY_TYPED only. See Also: java.awt.event.KeyEvent See Also: java.lang.System.currentTimeMillis |
pointerEventOccurred | void pointerEventOccurred(Window w, long when, int x, int y, int ID, int number)(Code) | | Called by the window system in order to deliver a pointer event.
Parameters: w - The window in which the event occurred. Parameters: when - Time at which the event occurred, in milliseconds since1/1/70 UTC. Parameters: x - x coordinate of position at which the event occurred.Coordinates are relative to the window. Parameters: y - y coordinate of position at which the event occurred.Coordinates are relative to the window. Parameters: ID - Type identifier indicating the kind of event Parameters: number - Used to distinguish among several buttons (etc) that could have been pressed or released. See Also: java.lang.System.currentTimeMillis |
windowEventOccurred | void windowEventOccurred(Window win, long when, int x, int y, int w, int h, int ID)(Code) | | Called by the window system in order to deliver a window event.
Parameters: win - The window on which the event occurred. Parameters: when - Time at which the event occurred, in milliseconds since1/1/70 UTC. Parameters: x - x coordinate of position at which the event occurred. Parameters: y - y coordinate of position at which the event occurred. Coordinates are relativeto the window's parent for a reshape or map event, but relative to the window itself for other events (enter, exit, and damage). Parameters: w - Width of window (reshape or map event) or of thearea to be repainted (damage event). Parameters: h - Width of window (reshape or map event) or of thearea to be repainted (damage event). Parameters: ID - Type identifier indicating the kind of event See Also: java.awt.event.KeyEvent See Also: java.lang.System.currentTimeMillis |
|
|