Home » apache-harmony-6.0-src-r917296-snapshot » org.apache.harmony.awt.wtk » [javadoc | source]
abstract public class: NativeEvent [javadoc | source]

Direct Known Subclasses:
    WinEvent, LinuxEvent

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.
Field Summary
public static final  int ID_PLATFORM    Message has no common cross-platform interpretation and should be skipped. 
public static final  int ID_BOUNDS_CHANGED    Window bounds have changed. 
public static final  int ID_INSETS_CHANGED    Window decoration size has changed. 
public static final  int ID_CREATED    Window was just created (WM_CREATE on Windows) 
public static final  int ID_MOUSE_GRAB_CANCELED    Mouse grab was canceled by the native system 
public static final  int ID_THEME_CHANGED    System color scheme or visual theme was changed 
protected  long windowId     
protected  int eventId     
protected  long otherWindowId     
protected  Point screenPos     
protected  Point localPos     
protected  Rectangle windowRect     
protected  int modifiers     
protected  int mouseButton     
protected  int wheelRotation     
protected  KeyInfo keyInfo     
protected  int windowState     
protected  long time     
Method from org.apache.harmony.awt.wtk.NativeEvent Summary:
getClipBounds,   getClipRects,   getEventId,   getInputModifiers,   getInsets,   getKeyChars,   getKeyLocation,   getLastChar,   getLocalPos,   getMouseButton,   getOtherWindowId,   getScreenPos,   getTime,   getTrigger,   getVKey,   getWheelRotation,   getWindowId,   getWindowRect,   getWindowState
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.harmony.awt.wtk.NativeEvent Detail:
 abstract public Rectangle getClipBounds()
    Returns the "dirty" area of the window as one rectangle. This area is to be painted.
 abstract public MultiRectArea getClipRects()
    Returns the "dirty" area of the window as set of non-intersecting rectangles. This area is to be painted.
 public int getEventId() 
    Returns cross-platform event id should be one of ID_* constants or id constants from java.awt.AWTEvent subclasess
 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. 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.
 abstract public Insets getInsets()
    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.
 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. For dead keys and input methods one key press can generate multiple key chars.
 public int getKeyLocation() 
    The same meaning as java.awt.event.getKeyLocation
 public char getLastChar() 
 public Point getLocalPos() 
    Returns the position of cursor when event occured relative to top-left corner of recipient window
 public int getMouseButton() 
    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.
 public long getOtherWindowId() 
    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.
 public Point getScreenPos() 
    Returns the position of cursor when event occured in screen coordinates.
 public long getTime() 
    Returns time when the message was received
 abstract public boolean getTrigger()
    Returns true if event is popup menu trigger.
 public int getVKey() 
    The same meaning as java.awt.event.getKeyCode
 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() 
    The recipient window bounds when the event occured
 public int getWindowState() 
    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