| java.lang.Object org.apache.harmony.awt.wtk.NativeEvent
All known Subclasses: org.apache.harmony.awt.wtk.linux.LinuxEvent, org.apache.harmony.awt.wtk.windows.WinEvent,
NativeEvent | abstract public class NativeEvent (Code) | | The interface describing cross-platform translation of system
messages.
Some messages can appear only on specific platform,
but they still can have cross-platform interpretation if the
application should be aware of them and can react using
cross-platform API.
|
Method Summary | |
abstract public Rectangle | getClipBounds() Returns the "dirty" area of the window as one rectangle. | abstract public MultiRectArea | getClipRects() Returns the "dirty" area of the window as set of non-intersecting
rectangles. | public int | getEventId() | public int | getInputModifiers() Returns the state of keyboard and mouse buttons when the event
occured if event from mouse or keyboard, for other events can
return junk values. | abstract public Insets | getInsets() Returns the window insets. | public StringBuffer | getKeyChars() Return the string of characters associated with the event
Has meaning only for KEY_PRESSED as should be translated to
serie of KEY_TYPED events. | public int | getKeyLocation() | public char | getLastChar() | public Point | getLocalPos() | public int | getMouseButton() Returns the number of mouse button which changed it's state,
otherwise 0. | public long | getOtherWindowId() For the focus event contains the oposite window. | public Point | getScreenPos() Returns the position of cursor when event occured
in screen coordinates. | public long | getTime() | abstract public boolean | getTrigger() Returns true if event is popup menu trigger. | public int | getVKey() | public int | getWheelRotation() Returns the number of "clicks" the mouse wheel was rotated. | public long | getWindowId() Returns the system window id of the event recipient. | public Rectangle | getWindowRect() | public int | getWindowState() Returns the iconified/maximized state of recipient window if
event is state related, for other events can junk values. |
ID_BOUNDS_CHANGED | final public static int ID_BOUNDS_CHANGED(Code) | | Window bounds have changed.
|
ID_CREATED | final public static int ID_CREATED(Code) | | Window was just created (WM_CREATE on Windows)
|
ID_INSETS_CHANGED | final public static int ID_INSETS_CHANGED(Code) | | Window decoration size has changed.
|
ID_MOUSE_GRAB_CANCELED | final public static int ID_MOUSE_GRAB_CANCELED(Code) | | Mouse grab was canceled by the native system
|
ID_PLATFORM | final public static int ID_PLATFORM(Code) | | Message has no common cross-platform
interpretation and should be skipped.
|
ID_THEME_CHANGED | final public static int ID_THEME_CHANGED(Code) | | System color scheme or visual theme was changed
|
eventId | protected int eventId(Code) | | |
modifiers | protected int modifiers(Code) | | |
mouseButton | protected int mouseButton(Code) | | |
otherWindowId | protected long otherWindowId(Code) | | |
wheelRotation | protected int wheelRotation(Code) | | |
windowId | protected long windowId(Code) | | |
windowState | protected int windowState(Code) | | |
getClipBounds | abstract public Rectangle getClipBounds()(Code) | | Returns the "dirty" area of the window as one rectangle.
This area is to be painted.
non-null Rectangle |
getClipRects | abstract public MultiRectArea getClipRects()(Code) | | Returns the "dirty" area of the window as set of non-intersecting
rectangles. This area is to be painted.
non-empty array of null if empty |
getEventId | public int getEventId()(Code) | | Returns cross-platform event id
should be one of ID_* constants or
id constants from java.awt.AWTEvent subclasess
cross-platform event id |
getInputModifiers | public int getInputModifiers()(Code) | | Returns the state of keyboard and mouse buttons when the event
occured if event from mouse or keyboard, for other events can
return junk values. The value is bitwise OR of
java.awt.event.InputEvent *_DOWN constants.
Method is aware of system mouse button swap for left-hand
mouse and return swapped values.
bitwise OR of java.awt.event.InputEvent *_DOWN constants |
getInsets | abstract public Insets getInsets()(Code) | | Returns the window insets. Insets is area which belongs to
window somehow but is outside of it's client area,
it usually contains system provided border and titlebar.
non-null java.awt.Insets |
getKeyChars | public StringBuffer getKeyChars()(Code) | | Return the string of characters associated with the event
Has meaning only for KEY_PRESSED as should be translated to
serie of KEY_TYPED events. For dead keys and input methods
one key press can generate multiple key chars.
string of characters |
getKeyLocation | public int getKeyLocation()(Code) | | The same meaning as java.awt.event.getKeyLocation
java.awt.event KEY_LOCATION_* constant |
getLastChar | public char getLastChar()(Code) | | |
getLocalPos | public Point getLocalPos()(Code) | | Returns the position of cursor when event occured relative to
top-left corner of recipient window
position of cursor in local coordinates |
getMouseButton | public int getMouseButton()(Code) | | Returns the number of mouse button which changed it's state,
otherwise 0.
Left button is 1, middle button is 2, right button is 3.
Method is aware of system mouse button swap for left-hand
mouse and return swapped values.
mouse button number |
getOtherWindowId | public long getOtherWindowId()(Code) | | For the focus event contains the oposite window.
This means it lost focus if recipient gains it,
or will gain focus if recipient looses it.
HWND on Windows, xwindnow on X |
getScreenPos | public Point getScreenPos()(Code) | | Returns the position of cursor when event occured
in screen coordinates.
position of cursor in screen coordinates |
getTime | public long getTime()(Code) | | Returns time when the message was received
time in milliseconds |
getTrigger | abstract public boolean getTrigger()(Code) | | Returns true if event is popup menu trigger.
boolean flag |
getVKey | public int getVKey()(Code) | | The same meaning as java.awt.event.getKeyCode
java.awt.event VK_* constant |
getWheelRotation | public int getWheelRotation()(Code) | | Returns the number of "clicks" the mouse wheel was rotated.
negative values if the mouse wheel was rotated up/away from the user,and positive values if the mouse wheel was rotated down/ towards the user |
getWindowId | public long getWindowId()(Code) | | Returns the system window id of the event recipient.
HWND on Windows, xwindnow on X |
getWindowRect | public Rectangle getWindowRect()(Code) | | The recipient window bounds when the event occured
window bounds |
getWindowState | public int getWindowState()(Code) | | Returns the iconified/maximized state of recipient window if
event is state related, for other events can junk values.
The value has the same meaning as Frame.getExtendedState
It's bitwise OR of ICONIFIED, MAXIMIZED_HORIZ, MAXIMIZED_VERT
bitwise OR of ICONIFIED, MAXIMIZED_HORIZ, MAXIMIZED_VERT |
|
|