Member | Description |
int button | The one-based index of the button that was clicked or released. |
char character | The character that was typed. |
int count | The number of pending paint events. |
Object data | Application-specific data. |
int detail | A detail constant from the SWT class that contains details about the event. |
Display display | The display where the event occurred. |
boolean doit | A flag indicating whether to process this event. Not supported for all events. |
int end | The end of the range of modified text. |
GC gc | The graphics context associated with this event. |
int height | The height in pixels of the rectangle that needs painting. |
Widget item | The widget where the event occurred. |
int keyCode | The key code of the key that was typed. |
int start | The beginning of the range of modified text. |
int stateMask | The mask describing the state of the modifier keys at the time of the event. |
String text | The text to insert. |
int time | The event's time. |
int type | The type of the event. This is the field to switch on to handle the various event types. |
Widget widget | The widget that issued the event. |
int width | The width in pixels of the rectangle that needs painting. |
int x | Either the x offset of the rectangle that needs painting or the x coordinate of the mouse pointer at the time of the event, depending n the event. |
int y | Either the y offset of the rectangle that needs painting or the y coordinate of the mouse pointer at the time of the event, depending on the event. |
To add an untyped listener to a widget, call addListener() on it.
Type | Description |
SWT.Activate | Triggered when the widget becomes the active window |
SWT.Arm | Triggered when the widget is armed |
SWT.Close | Triggered when the widget is closed |
SWT.Collapse | Triggered when a tree node is collapsed |
SWT.Deactivate | Triggered when the widget is no longer the active window |
SWT.DefaultSelection | Triggered when the default selection occurs |
SWT.Deiconify | Triggered when the widget is restored from being minimized |
SWT.Dispose | Triggered when the widget is disposed |
SWT.DragDetect | Triggered when the widget is dragged |
SWT.Expand | Triggered when a tree node is expanded |
SWT.FocusIn | Triggered when the widget gains focus |
SWT.FocusOut | Triggered when the widget loses focus |
SWT.HardKeyDown | Triggered when a special hardware key, such as on a Pocket PC device, is pressed |
SWT.HardKeyUp | Triggered when a special hardware key, such as on a Pocket PC device, is released |
SWT.Help | Triggered when the user requests help |
SWT.Hide | Triggered when the widget is hidden |
SWT.Iconify | Triggered when the widget is minimized |
SWT.KeyDown | Triggered when the user presses a key |
SWT.KeyUp | Triggered when the user releases a key |
SWT.MenuDetect | Triggered when a menu is selected |
SWT.Modify | Triggered when the text of a widget is modified |
SWT.MouseDoubleClick | Triggered when the mouse is double-clicked |
SWT.MouseDown | Triggered when the mouse button is clicked |
SWT.MouseEnter | Triggered when the mouse pointer enters the widget |
SWT.MouseExit | Triggered when the mouse pointer exits the widget |
SWT.MouseHover | Triggered when the mouse pointer hovers over the widget |
SWT.MouseMove | Triggered when the mouse pointer moves through the widget |
SWT.MouseUp | Triggered when the mouse button is released |
SWT.Move | Triggered when the widget is moved |
SWT.None | Null event |
SWT.Paint | Triggered when the widget is painted |
SWT.Resize | Triggered when the widget is resized |
SWT.Selection | Triggered when the widget is selected |
SWT.Show | Triggered when the widget is shown |
SWT.Traverse | Triggered when the user tabs through the controls |
SWT.Verify | Triggered when the text for the widget is about to change, allowing you to veto the change |