All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sun.porting.toolkit.ToolkitEventHandler

public interface ToolkitEventHandler
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.)


Variable Index

 o ACTION_PRESSED
Event ID for a press of special "non-keyboard" keys, like a "GO" key on a remote control.
 o ACTION_RELEASED
Event ID for a release of special "non-keyboard" keys, like a "GO" key on a remote control.
 o KEY_EVENT_END
Delimiting number: a key event will be less than KEY_EVENT_END.
 o KEY_EVENT_START
Delimiting number: a key event will be greater than KEY_EVENT_START.
 o KEY_PRESSED
Event ID for a key press corresponding to a typewriter-style keyboard.
 o KEY_RELEASED
Event ID for a key press corresponding to a typewriter-style keyboard.
 o KEY_TYPED
Event ID for an event indicating that a character was typed.
 o POINTER_DRAGGED
Event ID for a drag, i.e.
 o POINTER_EVENT_END
Delimiting number: a pointer event will be less than POINTER_EVENT_END.
 o POINTER_EVENT_START
Delimiting number: a pointer event will be greater than POINTER_EVENT_START.
 o POINTER_MOVED
Event ID for a position change.
 o POINTER_PRESSED
Event ID for a pointer press (i.e.
 o POINTER_RELEASED
Event ID for a pointer release (i.e.
 o WINDOW_DAMAGED
Event ID for indicating that a region of a window needs to be repainted.
 o WINDOW_ENTERED
Event ID for indicating that the pointing device has entered the window.
 o WINDOW_EVENT_END
Delimiting number: a window event will be less than WINDOW_EVENT_END.
 o WINDOW_EVENT_START
Delimiting number: a window event will be greater than WINDOW_EVENT_START.
 o WINDOW_EXITED
Event ID for indicating that the pointing device has left the window.
 o WINDOW_GOT_FOCUS
Event ID for indicating that a window has been assigned keyboard focus.
 o 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).
 o WINDOW_LOST_FOCUS
Event ID for indicating that a window no longer has the keyboard focus.
 o WINDOW_MAPPED
Event ID for indicating that a window has been mapped (made visible).
 o WINDOW_RESHAPED
Event ID for indicating that a window has been reshaped (moved and/or resized).
 o WINDOW_UNMAPPED
Event ID for indicating that a window has been unmapped (made invisible).

Method Index

 o keyboardEventOccurred(Window, long, int, int, char)
Called by the window system in order to deliver a keyboard event.
 o pointerEventOccurred(Window, long, int, int, int, int)
Called by the window system in order to deliver a pointer event.
 o windowEventOccurred(Window, long, int, int, int, int, int)
Called by the window system in order to deliver a window event.

Variables

 o POINTER_EVENT_START
 public static final int POINTER_EVENT_START
Delimiting number: a pointer event will be greater than POINTER_EVENT_START.

 o POINTER_PRESSED
 public static final int POINTER_PRESSED
Event ID for a pointer press (i.e. a press associated with position information, like a mouse click, touchscreen press, etc).

 o POINTER_RELEASED
 public static final int POINTER_RELEASED
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.

 o POINTER_DRAGGED
 public static final int POINTER_DRAGGED
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.

 o POINTER_MOVED
 public static final int POINTER_MOVED
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.

 o POINTER_EVENT_END
 public static final int POINTER_EVENT_END
Delimiting number: a pointer event will be less than POINTER_EVENT_END. (Note that this must be updated if new pointer events are added.)

 o KEY_EVENT_START
 public static final int KEY_EVENT_START
Delimiting number: a key event will be greater than KEY_EVENT_START.

 o KEY_PRESSED
 public static final int KEY_PRESSED
Event ID for a key press corresponding to a typewriter-style keyboard.

 o KEY_RELEASED
 public static final int KEY_RELEASED
Event ID for a key press corresponding to a typewriter-style keyboard.

 o KEY_TYPED
 public static final int KEY_TYPED
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.

 o ACTION_PRESSED
 public static final int ACTION_PRESSED
Event ID for a press of special "non-keyboard" keys, like a "GO" key on a remote control.

 o ACTION_RELEASED
 public static final int ACTION_RELEASED
Event ID for a release of special "non-keyboard" keys, like a "GO" key on a remote control.

 o KEY_EVENT_END
 public static final int KEY_EVENT_END
Delimiting number: a key event will be less than KEY_EVENT_END. (Note that this must be updated if new key events are added.)

 o WINDOW_EVENT_START
 public static final int WINDOW_EVENT_START
Delimiting number: a window event will be greater than WINDOW_EVENT_START.

 o WINDOW_RESHAPED
 public static final int WINDOW_RESHAPED
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.

 o WINDOW_GOT_FOCUS
 public static final int WINDOW_GOT_FOCUS
Event ID for indicating that a window has been assigned keyboard focus.

 o WINDOW_LOST_FOCUS
 public static final int WINDOW_LOST_FOCUS
Event ID for indicating that a window no longer has the keyboard focus.

 o WINDOW_DAMAGED
 public static final int WINDOW_DAMAGED
Event ID for indicating that a region of a window needs to be repainted.

 o WINDOW_ENTERED
 public static final int WINDOW_ENTERED
Event ID for indicating that the pointing device has entered the window.

 o WINDOW_EXITED
 public static final int WINDOW_EXITED
Event ID for indicating that the pointing device has left the window.

 o WINDOW_MAPPED
 public static final int WINDOW_MAPPED
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.

 o WINDOW_UNMAPPED
 public static final int WINDOW_UNMAPPED
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.

 o WINDOW_INVISIBLE
 public static 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). 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.

 o WINDOW_EVENT_END
 public static final int WINDOW_EVENT_END
Delimiting number: a window event will be less than WINDOW_EVENT_END. (Note that this must be updated if new window events are added.)

Methods

 o pointerEventOccurred
 public abstract 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.

Parameters:
w - The window in which the event occurred.
when - Time at which the event occurred, in milliseconds since 1/1/70 UTC.
x - x coordinate of position at which the event occurred. Coordinates are relative to the window.
y - y coordinate of position at which the event occurred. Coordinates are relative to the window.
ID - Type identifier indicating the kind of event
number - Used to distinguish among several buttons (etc) that could have been pressed or released.
See Also:
currentTimeMillis
 o keyboardEventOccurred
 public abstract void keyboardEventOccurred(Window win,
                                            long when,
                                            int ID,
                                            int keycode,
                                            char keychar)
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).
when - Time at which the event occurred, in milliseconds since 1/1/70 UTC.
ID - Type identifier indicating the kind of event
keycode - A code identifying which key was pressed.
keychar - Unicode character -- for KEY_TYPED only.
See Also:
KeyEvent, currentTimeMillis
 o windowEventOccurred
 public abstract 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.
when - Time at which the event occurred, in milliseconds since 1/1/70 UTC.
x - x coordinate of position at which the event occurred.
y - y coordinate of position at which the event occurred. Coordinates are relative to the window's parent for a reshape or map event, but relative to the window itself for other events (enter, exit, and damage).
w - Width of window (reshape or map event) or of the area to be repainted (damage event).
h - Width of window (reshape or map event) or of the area to be repainted (damage event).
ID - Type identifier indicating the kind of event
See Also:
KeyEvent, currentTimeMillis

All Packages  Class Hierarchy  This Package  Previous  Next  Index