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