|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Event
public class Event
Instances of this class provide a description of a particular event which occurred within SWT. The SWT untyped listener API uses these instances for all event dispatching.
Note: For a given event, only the fields which are appropriate will be filled in. The contents of the fields which are not used by the event are unspecified.
Listener
,
TypedEvent
Field Summary | |
---|---|
int |
button
the button that was pressed or released; 1 for the first button, 2 for the second button, and 3 for the third button, etc. |
char |
character
depending on the event, the character represented by the key that was typed. |
int |
count
depending on the event type, the number of following paint events which are pending which may always be zero on some platforms or the number of lines or pages to scroll using the mouse wheel |
java.lang.Object |
data
a field for application use |
int |
detail
the event specific detail field, as defined by the detail constants in class SWT |
Display |
display
the display where the event occurred |
boolean |
doit
depending on the event, a flag indicating whether the operation should be allowed. |
int |
end
depending on the event, the range of text being modified. |
GC |
gc
the graphics context to use when painting that is configured to use the colors, font and damaged region of the control. |
int |
height
the height of the bounding rectangle of the region that requires painting |
int |
index
the index of the item where the event occurred |
Widget |
item
the item that the event occurred in (can be null) |
int |
keyCode
depending on the event, the key code of the key that was typed, as defined by the key code constants in class SWT . |
int |
start
depending on the event, the range of text being modified. |
int |
stateMask
depending on the event, the state of the keyboard modifier keys and mouse masks at the time the event was generated. |
java.lang.String |
text
depending on the event, the new text that will be inserted. |
int |
time
the time that the event occurred. |
int |
type
the type of event, as defined by the event type constants in class SWT |
Widget |
widget
the widget that issued the event |
int |
width
the width of the bounding rectangle of the region that requires painting |
int |
x
depending on the event type, the x offset of the bounding rectangle of the region that requires painting or the widget-relative, x coordinate of the pointer at the time the mouse button was pressed or released |
int |
y
depending on the event type, the y offset of the bounding rectangle of the region that requires painting or the widget-relative, y coordinate of the pointer at the time the mouse button was pressed or released |
Constructor Summary | |
---|---|
Event()
|
Method Summary | |
---|---|
Rectangle |
getBounds()
Gets the bounds. |
void |
setBounds(Rectangle rect)
Sets the bounds. |
java.lang.String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Display display
public Widget widget
public int type
SWT
SWT
public int detail
SWT
SWT
public Widget item
public int index
public GC gc
public int x
public int y
public int width
public int height
public int count
public int time
public int button
public char character
public int keyCode
SWT
. When the character
field of the event is ambiguous, this field contains the unaffected value
of the original character. For example, typing Ctrl+M or Enter both result
in the character '\r' but the keyCode field will also contain '\r' when
Enter was typed and 'm' when Ctrl+M was typed.
SWT
public int stateMask
SWT
public int start
public int end
public java.lang.String text
public boolean doit
public java.lang.Object data
Constructor Detail |
---|
public Event()
Method Detail |
---|
public Rectangle getBounds()
public void setBounds(Rectangle rect)
rect
- the new rectanglepublic java.lang.String toString()
toString
in class java.lang.Object
|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.