Eclipse Platform
2.0

org.eclipse.swt
Class SWT

java.lang.Object
  |
  +--org.eclipse.swt.SWT
Direct Known Subclasses:
OLE

public class SWT
extends Object

This class provides access to a small number of SWT system-wide methods, and in addition defines the public constants provided by SWT.

By defining constants like UP and DOWN in a single class, SWT can share common names and concepts at the same time minimizing the number of classes, names and constants for the application programmer.

Note that some of the constants provided by this class represent optional, appearance related aspects of widgets which are available either only on some window systems, or for a differing set of widgets on each window system. These constants are marked as HINTs. The set of widgets which support a particular HINT may change from release to release, although we typically will not withdraw support for a HINT once it is made available.


Field Summary
static int ABORT
          MessageBox style constant for an ABORT button.
static int Activate
          activate event type (value is 26)
static int ALPHA
          Input Method Editor style constant for alpha input behavior (value is 1<<2)
static int ALT
          keyboard and/or mouse event mask indicating that the ALT key was pushed on the keyboard when the event was generated (value is 1<<16)
static int APPLICATION_MODAL
          style constant for application modal behavior (value is 1<<16)
Note that this is a HINT.
static int Arm
          arm event type (value is 30)
static int ARROW
          style constant for arrow button behavior (value is 1<<2)
static int ARROW_DOWN
          keyboard event constant representing the DOWN ARROW key (value is (1<<24)+2)
static int ARROW_LEFT
          keyboard event constant representing the LEFT ARROW key (value is (1<<24)+3)
static int ARROW_RIGHT
          keyboard event constant representing the RIGHT ARROW key (value is (1<<24)+4)
static int ARROW_UP
          keyboard event constant representing the UP ARROW key (value is (1<<24)+1)
static int BAR
          style constant for menu bar behavior (value is 1<<1)
static int BITMAP
          constant indicating that an image or operation is of type bitmap (value is 0)
static int BOLD
          font style constant indicating a bold weight font (value is 1<<0)
static int BORDER
          style constant for bordered behavior (value is 1<<11)
Note that this is a HINT.
static int BOTTOM
          style constant for align bottom behavior (value is 1<<10, since align DOWN and align BOTTOM are considered the same)
static char BS
          ASCII character convenience constant for the backspace character (value is the char '\b')
static int BUTTON1
          keyboard and/or mouse event mask indicating that mouse button one was pushed when the event was generated.
static int BUTTON2
          keyboard and/or mouse event mask indicating that mouse button two was pushed when the event was generated.
static int BUTTON3
          keyboard and/or mouse event mask indicating that mouse button three was pushed when the event was generated.
static int CANCEL
          MessageBox style constant for a CANCEL button.
static int CASCADE
          style constant for cascade behavior (value is 1<<6)
static int CENTER
          style constant for align center behavior (value is 1<<24)
static int CHECK
          style constant for check box behavior (value is 1<<5)
static int CLIP_CHILDREN
          style constant indicating that the window manager should clip a widget's children with respect to its viewable area.
static int CLIP_SIBLINGS
          style constant indicating that the window manager should clip a widget's siblings with respect to its viewable area.
static int Close
          close event type (value is 21)
static int CLOSE
          style constant for close box trim (value is 1<<6, since we do not distinguish between CLOSE style and MENU style)
static int Collapse
          collapse event type (value is 18)
static int COLOR_BLACK
          default color black (value is 2)
static int COLOR_BLUE
          default color blue (value is 9)
static int COLOR_CYAN
          default color cyan (value is 13)
static int COLOR_DARK_BLUE
          default color dark blue (value is 10)
static int COLOR_DARK_CYAN
          default color dark cyan (value is 14)
static int COLOR_DARK_GRAY
          default color dark gray (value is 16)
static int COLOR_DARK_GREEN
          default color dark green (value is 6)
static int COLOR_DARK_MAGENTA
          default color dark magenta (value is 12)
static int COLOR_DARK_RED
          default color dark red (value is 4)
static int COLOR_DARK_YELLOW
          default color dark yello (value is 8)
static int COLOR_GRAY
          default color gray (value is 15)
static int COLOR_GREEN
          default color green (value is 5)
static int COLOR_INFO_BACKGROUND
          system color used to paint tooltip background areas (value is 29)
static int COLOR_INFO_FOREGROUND
          system color used to paint tooltip text (value is 28)
static int COLOR_LIST_BACKGROUND
          system color used to paint list background areas (value is 25)
static int COLOR_LIST_FOREGROUND
          system color used to paint list foreground areas (value is 24)
static int COLOR_LIST_SELECTION
          system color used to paint list selection background areas (value is 26)
static int COLOR_LIST_SELECTION_TEXT
          system color used to paint list selected text (value is 27)
static int COLOR_MAGENTA
          default color magenta (value is 11)
static int COLOR_RED
          default color red (value is 3)
static int COLOR_TITLE_BACKGROUND
          system color used to paint title background areas (value is 31)
static int COLOR_TITLE_BACKGROUND_GRADIENT
          system color used to paint title background gradient (value is 32)
static int COLOR_TITLE_FOREGROUND
          system color used to paint title text (value is 30)
static int COLOR_TITLE_INACTIVE_BACKGROUND
          system color used to paint inactive title background areas (value is 34)
static int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT
          system color used to paint inactive title background gradient (value is 35)
static int COLOR_TITLE_INACTIVE_FOREGROUND
          system color used to paint inactive title text (value is 33)
static int COLOR_WHITE
          default color white (value is 1)
static int COLOR_WIDGET_BACKGROUND
          system color used to paint background areas (value is 22)
static int COLOR_WIDGET_BORDER
          system color used to paint border areas (value is 23)
static int COLOR_WIDGET_DARK_SHADOW
          system color used to paint dark shadow areas (value is 17)
static int COLOR_WIDGET_FOREGROUND
          system color used to paint foreground areas (value is 21)
static int COLOR_WIDGET_HIGHLIGHT_SHADOW
          system color used to paint highlight shadow areas (value is 20)
static int COLOR_WIDGET_LIGHT_SHADOW
          system color used to paint light shadow areas (value is 19)
static int COLOR_WIDGET_NORMAL_SHADOW
          system color used to paint normal shadow areas (value is 18)
static int COLOR_YELLOW
          default color yellow (value is 7)
static int CONTROL
          keyboard and/or mouse event mask indicating that the CTRL key was pushed on the keyboard when the event was generated.
static char CR
          ASCII character convenience constant for the carriage return character (value is the char '\r')
static int CTRL
          keyboard and/or mouse event mask indicating that the CTRL key was pushed on the keyboard when the event was generated (value is 1<<18)
static int CURSOR_APPSTARTING
          system app startup cursor (value is 3)
static int CURSOR_ARROW
          system arrow cursor (value is 0)
static int CURSOR_CROSS
          system cross hair cursor (value is 2)
static int CURSOR_HAND
          system hand cursor (value is 21)
static int CURSOR_HELP
          system help cursor (value is 4)
static int CURSOR_IBEAM
          system i-beam cursor (value is 19)
static int CURSOR_NO
          system "not allowed" cursor (value is 20)
static int CURSOR_SIZEALL
          system resize all directions cursor (value is 5)
static int CURSOR_SIZEE
          system resize east cursor (value is 12)
static int CURSOR_SIZEN
          system resize north cursor (value is 10)
static int CURSOR_SIZENE
          system resize north-east cursor (value is 14)
static int CURSOR_SIZENESW
          system resize north-east-south-west cursor (value is 6)
static int CURSOR_SIZENS
          system resize north-south cursor (value is 7)
static int CURSOR_SIZENW
          system resize north-west cursor (value is 17)
static int CURSOR_SIZENWSE
          system resize north-west-south-east cursor (value is 8)
static int CURSOR_SIZES
          system resize south cursor (value is 11)
static int CURSOR_SIZESE
          system resize south-east cursor (value is 15)
static int CURSOR_SIZESW
          system resize south-west cursor (value is 16)
static int CURSOR_SIZEW
          system resize west cursor (value is 13)
static int CURSOR_SIZEWE
          system resize west-east cursor (value is 9)
static int CURSOR_UPARROW
          system up arrow cursor (value is 18)
static int CURSOR_WAIT
          system wait cursor (value is 1)
static int DBCS
          Input Method Editor style constant for double byte input behavior (value is 1<<1)
static int Deactivate
          deactivate event type (value is 27)
static int DEFAULT
          indicates that a default should be used (value is -1)
static int DefaultSelection
          default selection event type (value is 14)
static int Deiconify
          de-iconify event type (value is 20)
static char DEL
          ASCII character convenience constant for the delete character (value is the char with value 127)
static int DIALOG_TRIM
          trim style convenience constant for the most common dialog shell appearance (value is CLOSE|TITLE|BORDER)
static int Dispose
          dispose event type (value is 12)
static int DM_FILL_BACKGROUND
          GIF image disposal method constants indicating that the the previous images should be covered with the background color before displaying the next image (value is 2)
static int DM_FILL_NONE
          GIF image disposal method constants indicating that the disposal method is to do nothing.
static int DM_FILL_PREVIOUS
          GIF image disposal method constants indicating that the disposal method is to restore the previous picture (value is 3)
static int DM_UNSPECIFIED
          GIF image disposal method constants indicating that the disposal method is unspecified (value is 0)
static int DOWN
          style constant for align down behavior (value is 1<<10, since align DOWN and align BOTTOM are considered the same)
static int DRAG
          indicates that a user-interface component is being dragged, for example dragging the thumb of a scroll bar (value is 1)
static int DragDetect
          drag detect event type (value is 29)
static int DRAW_DELIMITER
          draw constant indicating whether the string drawing operation should handle line-delimeters (value is 1<<1)
static int DRAW_MNEMONIC
          draw constant indicating whether the string drawing operation should handle mnemonics (value is 1<<3)
static int DRAW_TAB
          draw constant indicating whether the string drawing operation should expand TAB characters (value is 1<<2)
static int DRAW_TRANSPARENT
          draw constant indicating whether the drawing operation should fill the background (value is 1<<0)
static int DROP_DOWN
          style constant for drop down menu/list behavior (value is 1<<2)
static int END
          keyboard event constant representing the END key (value is (1<<24)+8)
static int ERROR_CANNOT_BE_ZERO
          SWT error constant indicating that a value which can not be zero was found to be (value is 7)
static int ERROR_CANNOT_GET_COUNT
          SWT error constant indicating that the underlying operating system was unable to provide count information (value is 36)
static int ERROR_CANNOT_GET_ENABLED
          SWT error constant indicating that the underlying operating system was unable to provide enabled/disabled state information (value is 31)
static int ERROR_CANNOT_GET_ITEM
          SWT error constant indicating that the underlying operating system was unable to provide the value of an item (value is 8)
static int ERROR_CANNOT_GET_ITEM_HEIGHT
          SWT error constant indicating that the underlying operating system was unable to provide the height of an item (value is 11)
static int ERROR_CANNOT_GET_SELECTION
          SWT error constant indicating that the underlying operating system was unable to provide the selection (value is 9)
static int ERROR_CANNOT_GET_TEXT
          SWT error constant indicating that the underlying operating system was unable to provide the text of a widget (value is 12)
static int ERROR_CANNOT_SET_ENABLED
          SWT error constant indicating that the underlying operating system was unable to set the enabled state (value is 30)
static int ERROR_CANNOT_SET_MENU
          SWT error constant indicating that the underlying operating system was unable to set the menu (value is 29)
static int ERROR_CANNOT_SET_SELECTION
          SWT error constant indicating that the underlying operating system was unable to set the selection of a widget (value is 28)
static int ERROR_CANNOT_SET_TEXT
          SWT error constant indicating that the underlying operating system was unable to set the text of a widget (value is 13)
static int ERROR_DEVICE_DISPOSED
          SWT error constant indicating that an attempt was made to invoke an SWT operation using a device which had already been disposed.
static int ERROR_FAILED_EXEC
          SWT error constant indicating that an exception happened when executing a runnable.
static int ERROR_FAILED_LOAD_LIBRARY
          SWT error constant indicating that an unsatisfied link error occured while attempting to load a library.
static int ERROR_GRAPHIC_DISPOSED
          SWT error constant indicating that an attempt was made to invoke an SWT operation using a graphics object which had already been disposed.
static int ERROR_INVALID_ARGUMENT
          SWT error constant indicating that an invalid argument was passed in (value is 5)
static int ERROR_INVALID_IMAGE
          SWT error constant indicating that a graphics operation was attempted with an image having an invalid format (value is 40)
static int ERROR_INVALID_PARENT
          SWT error constant indicating that a provided widget can not be used as a parent in the current operation (value is 32)
static int ERROR_INVALID_RANGE
          SWT error constant indicating that a value was found to be outside the allowable range (value is 6)
static int ERROR_INVALID_SUBCLASS
          SWT error constant indicating that an attempt was made to subclass an SWT widget class without implementing the checkSubclass() method.
static int ERROR_IO
          SWT error constant indicating that an input/output operation failed during the execution of an SWT operation (value is 39)
static int ERROR_ITEM_NOT_ADDED
          SWT error constant indicating that the underlying operating system was unable to add an item (value is 14)
static int ERROR_ITEM_NOT_REMOVED
          SWT error constant indicating that the underlying operating system was unable to remove an item (value is 15)
static int ERROR_MENU_NOT_BAR
          SWT error constant indicating that a menu which needed to have the menu bar style had some other style instead (value is 33)
static int ERROR_MENU_NOT_DROP_DOWN
          SWT error constant indicating that a menu which needed to have the drop down style had some other style instead (value is 21)
static int ERROR_MENU_NOT_POP_UP
          SWT error constant indicating that a menu which needed to have the pop up menu style had some other style instead (value is 37)
static int ERROR_MENUITEM_NOT_CASCADE
          SWT error constant indicating that a menu item which needed to have the cascade style had some other style instead (value is 27)
static int ERROR_NO_HANDLES
          SWT error constant indicating that no more handles for an operating system resource are available (value is 2)
static int ERROR_NO_MORE_CALLBACKS
          SWT error constant indicating that no more callback resources are available (value is 3)
static int ERROR_NOT_IMPLEMENTED
          SWT error constant indicating that a particular feature has not been implemented on this platform (value is 20)
static int ERROR_NULL_ARGUMENT
          SWT error constant indicating that a null argument was passed in (value is 4)
static int ERROR_THREAD_INVALID_ACCESS
          SWT error constant indicating that an attempt was made to invoke an SWT operation which can only be executed by the user-interface thread from some other thread (value is 22)
static int ERROR_UNSPECIFIED
          SWT error constant indicating that no error number was specified (value is 1)
static int ERROR_UNSUPPORTED_DEPTH
          SWT error constant indicating that a graphics operation was attempted with an image of an unsupported depth (value is 38)
static int ERROR_UNSUPPORTED_FORMAT
          SWT error constant indicating that a graphics operation was attempted with an image having a valid but unsupported format (value is 42)
static int ERROR_WIDGET_DISPOSED
          SWT error constant indicating that an attempt was made to invoke an SWT operation using a widget which had already been disposed.
static char ESC
          ASCII character convenience constant for the escape character (value is the char with value 27)
static int Expand
          expand event type (value is 17)
static int F1
          keyboard event constant representing the F1 key (value is (1<<24)+10)
static int F10
          keyboard event constant representing the F10 key (value is (1<<24)+19)
static int F11
          keyboard event constant representing the F11 key (value is (1<<24)+20)
static int F12
          keyboard event constant representing the F12 key (value is (1<<24)+21)
static int F2
          keyboard event constant representing the F2 key (value is (1<<24)+11)
static int F3
          keyboard event constant representing the F3 key (value is (1<<24)+12)
static int F4
          keyboard event constant representing the F4 key (value is (1<<24)+13)
static int F5
          keyboard event constant representing the F5 key (value is (1<<24)+14)
static int F6
          keyboard event constant representing the F6 key (value is (1<<24)+15)
static int F7
          keyboard event constant representing the F7 key (value is (1<<24)+16)
static int F8
          keyboard event constant representing the F8 key (value is (1<<24)+17)
static int F9
          keyboard event constant representing the F9 key (value is (1<<24)+18)
static int FLAT
          style constant for flat appearance.
static int FocusIn
          focus in event type (value is 15)
static int FocusOut
          focus out event type (value is 16)
static int FULL_SELECTION
          style constant for full row selection behavior.
static int H_SCROLL
          style constant for horizontal scrollbar behavior (value is 1<<8)
static int HardKeyDown
          hardware key down event type (value is 33)
static int HardKeyUp
          hardware key up event type (value is 34)
static int Help
          help event type (value is 28)
static int Hide
          hide event type (value is 23)
static int HIDE_SELECTION
          style constant for selection hiding behavior.
static int HOME
          keyboard event constant representing the HOME key (value is (1<<24)+7)
static int HORIZONTAL
          style constant for horizontal alignment or orientation behavior (value is 1<<8)
static int ICON
          constant indicating that an image or operation is of type icon (value is 1)
static int ICON_ERROR
          MessageBox style constant for error icon behavior (value is 1)
static int ICON_INFORMATION
          MessageBox style constant for information icon behavior (value is 1<<1)
static int ICON_QUESTION
          MessageBox style constant for question icon behavior (value is 1<<2)
static int ICON_WARNING
          MessageBox style constant for warning icon behavior (value is 1<<3)
static int ICON_WORKING
          MessageBox style constant for "working" icon behavior (value is 1<<4)
static int Iconify
          iconify event type (value is 19)
static int IGNORE
          MessageBox style constant for an IGNORE button.
static int IMAGE_BMP
          image format constant indicating a Windows BMP format image (value is 0)
static int IMAGE_BMP_RLE
          image format constant indicating a run-length encoded Windows BMP format image (value is 1)
static int IMAGE_COPY
          Image constructor argument indicating that the new image should be a copy of the image provided as an argument (value is 0)
static int IMAGE_DISABLE
          Image constructor argument indicating that the new image should have the appearance of a "disabled" (using the platform's rules for how this should look) copy of the image provided as an argument (value is 1)
static int IMAGE_GIF
          image format constant indicating a GIF format image (value is 2)
static int IMAGE_GRAY
          Image constructor argument indicating that the new image should have the appearance of a "gray scaled" copy of the image provided as an argument (value is 2)
static int IMAGE_ICO
          image format constant indicating a ICO format image (value is 3)
static int IMAGE_JPEG
          image format constant indicating a JPEG format image (value is 4)
static int IMAGE_PNG
          image format constant indicating a PNG format image (value is 5)
static int IMAGE_UNDEFINED
          image format constant indicating an unknown image type (value is -1)
static int INSERT
          keyboard event constant representing the INSERT key (value is (1<<24)+9)
static int ITALIC
          font style constant indicating an italic font (value is 1<<1)
static int KeyDown
          key down event type (value is 1)
static int KeyUp
          key up event type (value is 2)
static int LEFT
          style constant for align left behavior (value is 1<<14)
static char LF
          ASCII character convenience constant for the line feed character (value is the char '\n')
static int LINE_DASH
          line drawing style for dashed lines (value is 2)
static int LINE_DASHDOT
          line drawing style for alternating dash-dot lines (value is 4)
static int LINE_DASHDOTDOT
          line drawing style for dash-dot-dot lines (value is 5)
static int LINE_DOT
          line drawing style for dotted lines (value is 3)
static int LINE_SOLID
          line drawing style for solid lines (value is 1)
static int MAX
          style constant for maximize box trim (value is 1<<10)
static int MENU
          style constant for shell menu trim (value is 1<<6, since we do not distinguish between CLOSE style and MENU style)
static int MIN
          style constant for minimize box trim (value is 1<<7)
static int MODELESS
          style constant for modeless behavior (value is 0)
Note that this is a HINT.
static int Modify
          modify event type (value is 24)
static int MouseDoubleClick
          mouse double click event type (value is 8)
static int MouseDown
          mouse down event type (value is 3)
static int MouseEnter
          mouse enter event type (value is 6)
static int MouseExit
          Mouse exit event type (value is 7)
static int MouseHover
          mouse hover event type (value is 32)
static int MouseMove
          mouse move event type (value is 5)
static int MouseUp
          mouse up event type (value is 4)
static int Move
          move event type (value is 10)
static int MULTI
          style constant for multi-selection behavior in lists and multiple line support on text fields (value is 1<<1)
static int NATIVE
          Input Method Editor style constant for native input behavior (value is 1<<3)
static int NO
          MessageBox style constant for NO button.
static int NO_BACKGROUND
          style constant for no background behavior (value is 1<<18)
static int NO_FOCUS
          style constant for does not take focus behavior (value is 1<<19)
Note that this is a HINT.
static int NO_MERGE_PAINTS
          style constant for no paint event merging behavior (value is 1<<21)
static int NO_RADIO_GROUP
          style constant for preventing child radio group behavior (value is 1<<22)
static int NO_REDRAW_RESIZE
          style constant for no redraw on resize behavior (value is 1<<20)
static int NO_TRIM
          style constant to ensure no trimmings are used (value is 1<<3)
Note that this overrides all other trim styles.
static int NONE
          a constant known to be zero (0), used in operations which take bit flags to indicate that "no bits are set"
static int NORMAL
          font style constant indicating a normal weight, non-italic font (value is 0)
static int NULL
          a constant known to be zero (0), used in operations which take pointers to indicate a null argument
static int OK
          MessageBox style constant for an OK button.
static int ON_TOP
          style constant for always on top behavior (value is 1<<14)
Note that this is a HINT.
static int OPEN
          FileDialog style constant for open file dialog behavior (value is 1<<12)
static int PAGE_DOWN
          keyboard event constant representing the PAGE DOWN key (value is (1<<24)+6)
static int PAGE_UP
          keyboard event constant representing the PAGE UP key (value is (1<<24)+5)
static int Paint
          paint event type (value is 9)
static int PHONETIC
          Input Method Editor style constant for phonetic input behavior (value is 1<<4)
static int POP_UP
          style constant for pop up menu behavior (value is 1<<3)
static int PRIMARY_MODAL
          style constant for primary modal behavior (value is 1<<15)
Note that this is a HINT.
static int PUSH
          style constant for push button behavior (value is 1<<3)
static int RADIO
          style constant for radio button behavior (value is 1<<4)
static int READ_ONLY
          style constant for read-only behavior (value is 1<<3)
static int Resize
          resize event type (value is 11)
static int RESIZE
          style constant for resize box trim (value is 1<<4)
static int RETRY
          MessageBox style constant for a RETRY button.
static int RIGHT
          style constant for align right behavior (value is 1<<17)
static int ROMAN
          Input Method Editor style constant for romanicized input behavior (value is 1<<5)
static int SAVE
          FileDialog style constant for save file dialog behavior (value is 1<<13)
static int Selection
          selection event type (value is 13)
static int SEPARATOR
          style constant for line separator behavior (value is 1<<1)
static int SHADOW_ETCHED_IN
          style constant for shadow etched in behavior (value is 1<<4)
Note that this is a HINT.
static int SHADOW_ETCHED_OUT
          style constant for shadow etched out behavior (value is 1<<6)
Note that this is a HINT.
static int SHADOW_IN
          style constant for shadow in behavior (value is 1<<2)
Note that this is a HINT.
static int SHADOW_NONE
          style constant for no shadow behavior (value is 1<<5)
Note that this is a HINT.
static int SHADOW_OUT
          style constant for shadow out behavior (value is 1<<3)
Note that this is a HINT.
static int SHELL_TRIM
          trim style convenience constant for the most common top level shell appearance (value is CLOSE|TITLE|MIN|MAX|RESIZE)
static int SHIFT
          keyboard and/or mouse event mask indicating that the SHIFT key was pushed on the keyboard when the event was generated (value is 1<<17)
static int Show
          show event type (value is 22)
static int SIMPLE
          style constant for simple (not drop down) behavior (value is 1<<6)
static int SINGLE
          style constant for single selection behavior in lists and single line support on text fields (value is 1<<2)
static int SMOOTH
          style constant for flat appearance.
static int SYSTEM_MODAL
          style constant for system modal behavior (value is 1<<17)
Note that this is a HINT.
static int TITLE
          style constant for title area trim (value is 1<<5)
static int TOGGLE
          style constant for toggle button behavior (value is 1<<1)
static int TOOL
          style constant for tool window behavior (value is 1<<2)
static int TOP
          style constant for align top behavior (value is 1<<7, since align UP and align TOP are considered the same)
static int TRANSPARENCY_ALPHA
          image transparency constant indicating that the image contains alpha transparency information (value is 1<<0)
static int TRANSPARENCY_MASK
          image transparency constant indicating that the image contains a transparency mask (value is 1<<1)
static int TRANSPARENCY_NONE
          image transparency constant indicating that the image contains no transparency information (value is 0)
static int TRANSPARENCY_PIXEL
          image transparency constant indicating that the image contains a transparent pixel (value is 1<<2)
static int Traverse
          traverse event type (value is 31)
static int TRAVERSE_ARROW_NEXT
          traversal event detail field value indicating that the key which designates that focus should be given to the previous tab item was pressed; typically, this is either the RIGHT-ARROW or DOWN-ARROW keys (value is 1<<6)
static int TRAVERSE_ARROW_PREVIOUS
          traversal event detail field value indicating that the key which designates that focus should be given to the previous tab item was pressed; typically, this is either the LEFT-ARROW or UP-ARROW keys (value is 1<<5)
static int TRAVERSE_ESCAPE
          traversal event detail field value indicating that the key which designates that a dialog should be cancelled was pressed; typically, this is the ESC key (value is 1<<1)
static int TRAVERSE_MNEMONIC
          traversal event detail field value indicating that a mnemonic key sequence was pressed (value is 1<<7)
static int TRAVERSE_NONE
          traversal event detail field value indicating that no traversal action should be taken.
static int TRAVERSE_PAGE_NEXT
          traversal event detail field value indicating that the key which designates that the next page of a multi-page window should be shown was pressed; typically, this is the CTRL-PAGEDOWN key sequence (value is 1<<9)
static int TRAVERSE_PAGE_PREVIOUS
          traversal event detail field value indicating that the key which designates that the previous page of a multi-page window should be shown was pressed; typically, this is the CTRL-PAGEUP key sequence (value is 1<<8)
static int TRAVERSE_RETURN
          traversal event detail field value indicating that the key which activates the default button in a dialog was pressed; typically, this is the ENTER key (value is 1<<2)
static int TRAVERSE_TAB_NEXT
          traversal event detail field value indicating that the key which designates that focus should be given to the next tab group was pressed; typically, this is the TAB key (value is 1<<4)
static int TRAVERSE_TAB_PREVIOUS
          traversal event detail field value indicating that the key which designates that focus should be given to the previous tab group was pressed; typically, this is the SHIFT-TAB key sequence (value is 1<<3)
static int UP
          style constant for align up behavior (value is 1<<7, since align UP and align TOP are considered the same)
static int V_SCROLL
          style constant for vertical scrollbar behavior (value is 1<<9)
static int Verify
          verify event type (value is 25)
static int VERTICAL
          style constant for vertical alignment or orientation behavior (value is 1<<9)
static int WRAP
          style constant for automatic line wrap behavior (value is 1<<6)
static int YES
          MessageBox style constant for YES button.
 
Constructor Summary
SWT()
           
 
Method Summary
static void error(int code)
          Throws an appropriate exception based on the passed in error code.
static void error(int code, Throwable throwable)
          Throws an appropriate exception based on the passed in error code.
static String getMessage(String key)
          Returns the NLS'ed message for the given argument.
static String getPlatform()
          Returns the SWT platform name.
static int getVersion()
          Returns the SWT version number as an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KeyDown

public static final int KeyDown
key down event type (value is 1)

See Also:
Constant Field Values

KeyUp

public static final int KeyUp
key up event type (value is 2)

See Also:
Constant Field Values

MouseDown

public static final int MouseDown
mouse down event type (value is 3)

See Also:
Constant Field Values

MouseUp

public static final int MouseUp
mouse up event type (value is 4)

See Also:
Constant Field Values

MouseMove

public static final int MouseMove
mouse move event type (value is 5)

See Also:
Constant Field Values

MouseEnter

public static final int MouseEnter
mouse enter event type (value is 6)

See Also:
Constant Field Values

MouseExit

public static final int MouseExit
Mouse exit event type (value is 7)

See Also:
Constant Field Values

MouseDoubleClick

public static final int MouseDoubleClick
mouse double click event type (value is 8)

See Also:
Constant Field Values

Paint

public static final int Paint
paint event type (value is 9)

See Also:
Constant Field Values

Move

public static final int Move
move event type (value is 10)

See Also:
Constant Field Values

Resize

public static final int Resize
resize event type (value is 11)

See Also:
Constant Field Values

Dispose

public static final int Dispose
dispose event type (value is 12)

See Also:
Constant Field Values

Selection

public static final int Selection
selection event type (value is 13)

See Also:
Constant Field Values

DefaultSelection

public static final int DefaultSelection
default selection event type (value is 14)

See Also:
Constant Field Values

FocusIn

public static final int FocusIn
focus in event type (value is 15)

See Also:
Constant Field Values

FocusOut

public static final int FocusOut
focus out event type (value is 16)

See Also:
Constant Field Values

Expand

public static final int Expand
expand event type (value is 17)

See Also:
Constant Field Values

Collapse

public static final int Collapse
collapse event type (value is 18)

See Also:
Constant Field Values

Iconify

public static final int Iconify
iconify event type (value is 19)

See Also:
Constant Field Values

Deiconify

public static final int Deiconify
de-iconify event type (value is 20)

See Also:
Constant Field Values

Close

public static final int Close
close event type (value is 21)

See Also:
Constant Field Values

Show

public static final int Show
show event type (value is 22)

See Also:
Constant Field Values

Hide

public static final int Hide
hide event type (value is 23)

See Also:
Constant Field Values

Modify

public static final int Modify
modify event type (value is 24)

See Also:
Constant Field Values

Verify

public static final int Verify
verify event type (value is 25)

See Also:
Constant Field Values

Activate

public static final int Activate
activate event type (value is 26)

See Also:
Constant Field Values

Deactivate

public static final int Deactivate
deactivate event type (value is 27)

See Also:
Constant Field Values

Help

public static final int Help
help event type (value is 28)

See Also:
Constant Field Values

DragDetect

public static final int DragDetect
drag detect event type (value is 29)

See Also:
Constant Field Values

Arm

public static final int Arm
arm event type (value is 30)

See Also:
Constant Field Values

Traverse

public static final int Traverse
traverse event type (value is 31)

See Also:
Constant Field Values

MouseHover

public static final int MouseHover
mouse hover event type (value is 32)

See Also:
Constant Field Values

HardKeyDown

public static final int HardKeyDown
hardware key down event type (value is 33)

See Also:
Constant Field Values

HardKeyUp

public static final int HardKeyUp
hardware key up event type (value is 34)

See Also:
Constant Field Values

NONE

public static final int NONE
a constant known to be zero (0), used in operations which take bit flags to indicate that "no bits are set"

See Also:
Constant Field Values

DRAG

public static final int DRAG
indicates that a user-interface component is being dragged, for example dragging the thumb of a scroll bar (value is 1)

See Also:
Constant Field Values

NULL

public static final int NULL
a constant known to be zero (0), used in operations which take pointers to indicate a null argument

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
indicates that a default should be used (value is -1)

See Also:
Constant Field Values

BAR

public static final int BAR
style constant for menu bar behavior (value is 1<<1)

Used By:

See Also:
Constant Field Values

DROP_DOWN

public static final int DROP_DOWN
style constant for drop down menu/list behavior (value is 1<<2)

Used By:

See Also:
Constant Field Values

POP_UP

public static final int POP_UP
style constant for pop up menu behavior (value is 1<<3)

Used By:

See Also:
Constant Field Values

SEPARATOR

public static final int SEPARATOR
style constant for line separator behavior (value is 1<<1)

Used By:

See Also:
Constant Field Values

TOGGLE

public static final int TOGGLE
style constant for toggle button behavior (value is 1<<1)

Used By:

See Also:
Constant Field Values

ARROW

public static final int ARROW
style constant for arrow button behavior (value is 1<<2)

Used By:

See Also:
Constant Field Values

PUSH

public static final int PUSH
style constant for push button behavior (value is 1<<3)

Used By:

See Also:
Constant Field Values

RADIO

public static final int RADIO
style constant for radio button behavior (value is 1<<4)

Used By:

See Also:
Constant Field Values

CHECK

public static final int CHECK
style constant for check box behavior (value is 1<<5)

Used By:

See Also:
Constant Field Values

CASCADE

public static final int CASCADE
style constant for cascade behavior (value is 1<<6)

Used By:

See Also:
Constant Field Values

MULTI

public static final int MULTI
style constant for multi-selection behavior in lists and multiple line support on text fields (value is 1<<1)

Used By:

See Also:
Constant Field Values

SINGLE

public static final int SINGLE
style constant for single selection behavior in lists and single line support on text fields (value is 1<<2)

Used By:

See Also:
Constant Field Values

READ_ONLY

public static final int READ_ONLY
style constant for read-only behavior (value is 1<<3)

Used By:

See Also:
Constant Field Values

WRAP

public static final int WRAP
style constant for automatic line wrap behavior (value is 1<<6)

Used By:

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
style constant for simple (not drop down) behavior (value is 1<<6)

Used By:

See Also:
Constant Field Values

SHADOW_IN

public static final int SHADOW_IN
style constant for shadow in behavior (value is 1<<2)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

SHADOW_OUT

public static final int SHADOW_OUT
style constant for shadow out behavior (value is 1<<3)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

SHADOW_ETCHED_IN

public static final int SHADOW_ETCHED_IN
style constant for shadow etched in behavior (value is 1<<4)
Note that this is a HINT. It is ignored on all platforms except Motif.

Used By:

See Also:
Constant Field Values

SHADOW_ETCHED_OUT

public static final int SHADOW_ETCHED_OUT
style constant for shadow etched out behavior (value is 1<<6)
Note that this is a HINT. It is ignored on all platforms except Motif.

Used By:

See Also:
Constant Field Values

SHADOW_NONE

public static final int SHADOW_NONE
style constant for no shadow behavior (value is 1<<5)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

TOOL

public static final int TOOL
style constant for tool window behavior (value is 1<<2)

A tool window is a window intended to be used as a floating toolbar. It typically has a title bar that is shorter than a normal title bar, and the window title is typically drawn using a smaller font.
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

NO_TRIM

public static final int NO_TRIM
style constant to ensure no trimmings are used (value is 1<<3)
Note that this overrides all other trim styles.

Used By:

See Also:
Constant Field Values

RESIZE

public static final int RESIZE
style constant for resize box trim (value is 1<<4)

Used By:

See Also:
Constant Field Values

TITLE

public static final int TITLE
style constant for title area trim (value is 1<<5)

Used By:

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
style constant for close box trim (value is 1<<6, since we do not distinguish between CLOSE style and MENU style)

Used By:

See Also:
Constant Field Values

MENU

public static final int MENU
style constant for shell menu trim (value is 1<<6, since we do not distinguish between CLOSE style and MENU style)

Used By:

See Also:
Constant Field Values

MIN

public static final int MIN
style constant for minimize box trim (value is 1<<7)

Used By:

See Also:
Constant Field Values

MAX

public static final int MAX
style constant for maximize box trim (value is 1<<10)

Used By:

See Also:
Constant Field Values

H_SCROLL

public static final int H_SCROLL
style constant for horizontal scrollbar behavior (value is 1<<8)

Used By:

See Also:
Constant Field Values

V_SCROLL

public static final int V_SCROLL
style constant for vertical scrollbar behavior (value is 1<<9)

Used By:

See Also:
Constant Field Values

BORDER

public static final int BORDER
style constant for bordered behavior (value is 1<<11)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

CLIP_CHILDREN

public static final int CLIP_CHILDREN
style constant indicating that the window manager should clip a widget's children with respect to its viewable area. (value is 1<<12)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

CLIP_SIBLINGS

public static final int CLIP_SIBLINGS
style constant indicating that the window manager should clip a widget's siblings with respect to its viewable area. (value is 1<<13)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

ON_TOP

public static final int ON_TOP
style constant for always on top behavior (value is 1<<14)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

SHELL_TRIM

public static final int SHELL_TRIM
trim style convenience constant for the most common top level shell appearance (value is CLOSE|TITLE|MIN|MAX|RESIZE)

Used By:

See Also:
Constant Field Values

DIALOG_TRIM

public static final int DIALOG_TRIM
trim style convenience constant for the most common dialog shell appearance (value is CLOSE|TITLE|BORDER)

Used By:

See Also:
Constant Field Values

MODELESS

public static final int MODELESS
style constant for modeless behavior (value is 0)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

PRIMARY_MODAL

public static final int PRIMARY_MODAL
style constant for primary modal behavior (value is 1<<15)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

APPLICATION_MODAL

public static final int APPLICATION_MODAL
style constant for application modal behavior (value is 1<<16)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

SYSTEM_MODAL

public static final int SYSTEM_MODAL
style constant for system modal behavior (value is 1<<17)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

HIDE_SELECTION

public static final int HIDE_SELECTION
style constant for selection hiding behavior. (value is 1<<15)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

FULL_SELECTION

public static final int FULL_SELECTION
style constant for full row selection behavior. (value is 1<<16, since FULL_SELECTION and SMOOTH share the same value, but are implemented on non-intersecting sets of widgets)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

FLAT

public static final int FLAT
style constant for flat appearance. (value is 1<<23)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

SMOOTH

public static final int SMOOTH
style constant for flat appearance. (value is 1<<16, since FULL_SELECTION and SMOOTH share the same value, but are implemented on non-intersecting sets of widgets)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

NO_BACKGROUND

public static final int NO_BACKGROUND
style constant for no background behavior (value is 1<<18)

By default, before a widget paints, the client area is filled with the current background color. When this style is specified, the background is not filled, and the application is responsible for filling every pixel of the client area. This style might be used as an alternative to "double-buffering" in order to reduce flicker. This style does not mean "transparent" - widgets that are obscured will not draw through.

Used By:

See Also:
Constant Field Values

NO_FOCUS

public static final int NO_FOCUS
style constant for does not take focus behavior (value is 1<<19)
Note that this is a HINT.

Used By:

See Also:
Constant Field Values

NO_REDRAW_RESIZE

public static final int NO_REDRAW_RESIZE
style constant for no redraw on resize behavior (value is 1<<20)

This style stops the entire client area from being invalidated when the size of the Canvas changes. Specifically, when the size of the Canvas gets smaller, the SWT.Paint event is not sent. When it gets bigger, an SWT.Paint event is sent with a GC clipped to only the new areas to be painted. Without this style, the entire client area will be repainted.

Used By:

See Also:
Constant Field Values

NO_MERGE_PAINTS

public static final int NO_MERGE_PAINTS
style constant for no paint event merging behavior (value is 1<<21)

Used By:

See Also:
Constant Field Values

NO_RADIO_GROUP

public static final int NO_RADIO_GROUP
style constant for preventing child radio group behavior (value is 1<<22)

Used By:

See Also:
Constant Field Values

UP

public static final int UP
style constant for align up behavior (value is 1<<7, since align UP and align TOP are considered the same)

Used By:

See Also:
Constant Field Values

TOP

public static final int TOP
style constant for align top behavior (value is 1<<7, since align UP and align TOP are considered the same)

Used By:

See Also:
Constant Field Values

DOWN

public static final int DOWN
style constant for align down behavior (value is 1<<10, since align DOWN and align BOTTOM are considered the same)

Used By:

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
style constant for align bottom behavior (value is 1<<10, since align DOWN and align BOTTOM are considered the same)

Used By:

See Also:
Constant Field Values

LEFT

public static final int LEFT
style constant for align left behavior (value is 1<<14)

Used By:

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
style constant for align right behavior (value is 1<<17)

Used By:

See Also:
Constant Field Values

CENTER

public static final int CENTER
style constant for align center behavior (value is 1<<24)

Used By:

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
style constant for horizontal alignment or orientation behavior (value is 1<<8)

Used By:

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
style constant for vertical alignment or orientation behavior (value is 1<<9)

Used By:

See Also:
Constant Field Values

DBCS

public static final int DBCS
Input Method Editor style constant for double byte input behavior (value is 1<<1)

See Also:
Constant Field Values

ALPHA

public static final int ALPHA
Input Method Editor style constant for alpha input behavior (value is 1<<2)

See Also:
Constant Field Values

NATIVE

public static final int NATIVE
Input Method Editor style constant for native input behavior (value is 1<<3)

See Also:
Constant Field Values

PHONETIC

public static final int PHONETIC
Input Method Editor style constant for phonetic input behavior (value is 1<<4)

See Also:
Constant Field Values

ROMAN

public static final int ROMAN
Input Method Editor style constant for romanicized input behavior (value is 1<<5)

See Also:
Constant Field Values

ESC

public static final char ESC
ASCII character convenience constant for the escape character (value is the char with value 27)

See Also:
Constant Field Values

DEL

public static final char DEL
ASCII character convenience constant for the delete character (value is the char with value 127)

See Also:
Constant Field Values

BS

public static final char BS
ASCII character convenience constant for the backspace character (value is the char '\b')

See Also:
Constant Field Values

CR

public static final char CR
ASCII character convenience constant for the carriage return character (value is the char '\r')

See Also:
Constant Field Values

LF

public static final char LF
ASCII character convenience constant for the line feed character (value is the char '\n')

See Also:
Constant Field Values

ALT

public static final int ALT
keyboard and/or mouse event mask indicating that the ALT key was pushed on the keyboard when the event was generated (value is 1<<16)

See Also:
Constant Field Values

SHIFT

public static final int SHIFT
keyboard and/or mouse event mask indicating that the SHIFT key was pushed on the keyboard when the event was generated (value is 1<<17)

See Also:
Constant Field Values

CTRL

public static final int CTRL
keyboard and/or mouse event mask indicating that the CTRL key was pushed on the keyboard when the event was generated (value is 1<<18)

See Also:
Constant Field Values

CONTROL

public static final int CONTROL
keyboard and/or mouse event mask indicating that the CTRL key was pushed on the keyboard when the event was generated. This is a synonym for CTRL (value is 1<<18)

See Also:
Constant Field Values

BUTTON1

public static final int BUTTON1
keyboard and/or mouse event mask indicating that mouse button one was pushed when the event was generated. (value is 1<<19)

See Also:
Constant Field Values

BUTTON2

public static final int BUTTON2
keyboard and/or mouse event mask indicating that mouse button two was pushed when the event was generated. (value is 1<<20)

See Also:
Constant Field Values

BUTTON3

public static final int BUTTON3
keyboard and/or mouse event mask indicating that mouse button three was pushed when the event was generated. (value is 1<<21)

See Also:
Constant Field Values

ARROW_UP

public static final int ARROW_UP
keyboard event constant representing the UP ARROW key (value is (1<<24)+1)

See Also:
Constant Field Values

ARROW_DOWN

public static final int ARROW_DOWN
keyboard event constant representing the DOWN ARROW key (value is (1<<24)+2)

See Also:
Constant Field Values

ARROW_LEFT

public static final int ARROW_LEFT
keyboard event constant representing the LEFT ARROW key (value is (1<<24)+3)

See Also:
Constant Field Values

ARROW_RIGHT

public static final int ARROW_RIGHT
keyboard event constant representing the RIGHT ARROW key (value is (1<<24)+4)

See Also:
Constant Field Values

PAGE_UP

public static final int PAGE_UP
keyboard event constant representing the PAGE UP key (value is (1<<24)+5)

See Also:
Constant Field Values

PAGE_DOWN

public static final int PAGE_DOWN
keyboard event constant representing the PAGE DOWN key (value is (1<<24)+6)

See Also:
Constant Field Values

HOME

public static final int HOME
keyboard event constant representing the HOME key (value is (1<<24)+7)

See Also:
Constant Field Values

END

public static final int END
keyboard event constant representing the END key (value is (1<<24)+8)

See Also:
Constant Field Values

INSERT

public static final int INSERT
keyboard event constant representing the INSERT key (value is (1<<24)+9)

See Also:
Constant Field Values

F1

public static final int F1
keyboard event constant representing the F1 key (value is (1<<24)+10)

See Also:
Constant Field Values

F2

public static final int F2
keyboard event constant representing the F2 key (value is (1<<24)+11)

See Also:
Constant Field Values

F3

public static final int F3
keyboard event constant representing the F3 key (value is (1<<24)+12)

See Also:
Constant Field Values

F4

public static final int F4
keyboard event constant representing the F4 key (value is (1<<24)+13)

See Also:
Constant Field Values

F5

public static final int F5
keyboard event constant representing the F5 key (value is (1<<24)+14)

See Also:
Constant Field Values

F6

public static final int F6
keyboard event constant representing the F6 key (value is (1<<24)+15)

See Also:
Constant Field Values

F7

public static final int F7
keyboard event constant representing the F7 key (value is (1<<24)+16)

See Also:
Constant Field Values

F8

public static final int F8
keyboard event constant representing the F8 key (value is (1<<24)+17)

See Also:
Constant Field Values

F9

public static final int F9
keyboard event constant representing the F9 key (value is (1<<24)+18)

See Also:
Constant Field Values

F10

public static final int F10
keyboard event constant representing the F10 key (value is (1<<24)+19)

See Also:
Constant Field Values

F11

public static final int F11
keyboard event constant representing the F11 key (value is (1<<24)+20)

See Also:
Constant Field Values

F12

public static final int F12
keyboard event constant representing the F12 key (value is (1<<24)+21)

See Also:
Constant Field Values

ICON_ERROR

public static final int ICON_ERROR
MessageBox style constant for error icon behavior (value is 1)

See Also:
Constant Field Values

ICON_INFORMATION

public static final int ICON_INFORMATION
MessageBox style constant for information icon behavior (value is 1<<1)

See Also:
Constant Field Values

ICON_QUESTION

public static final int ICON_QUESTION
MessageBox style constant for question icon behavior (value is 1<<2)

See Also:
Constant Field Values

ICON_WARNING

public static final int ICON_WARNING
MessageBox style constant for warning icon behavior (value is 1<<3)

See Also:
Constant Field Values

ICON_WORKING

public static final int ICON_WORKING
MessageBox style constant for "working" icon behavior (value is 1<<4)

See Also:
Constant Field Values

OK

public static final int OK
MessageBox style constant for an OK button. Valid combinations are OK, OK|CANCEL (value is 1<<5)

See Also:
Constant Field Values

YES

public static final int YES
MessageBox style constant for YES button. Valid combinations are YES|NO, YES|NO|CANCEL (value is 1<<6)

See Also:
Constant Field Values

NO

public static final int NO
MessageBox style constant for NO button. Valid combinations are YES|NO, YES|NO|CANCEL (value is 1<<7)

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
MessageBox style constant for a CANCEL button. Valid combinations are OK|CANCEL, YES|NO|CANCEL, RETRY|CANCEL (value is 1<<8)

See Also:
Constant Field Values

ABORT

public static final int ABORT
MessageBox style constant for an ABORT button. The only valid combination is ABORT|RETRY|IGNORE (value is 1<<9)

See Also:
Constant Field Values

RETRY

public static final int RETRY
MessageBox style constant for a RETRY button. Valid combinations are ABORT|RETRY|IGNORE, RETRY|CANCEL (value is 1<<10)

See Also:
Constant Field Values

IGNORE

public static final int IGNORE
MessageBox style constant for an IGNORE button. The only valid combination is ABORT|RETRY|IGNORE (value is 1<<11)

See Also:
Constant Field Values

OPEN

public static final int OPEN
FileDialog style constant for open file dialog behavior (value is 1<<12)

See Also:
Constant Field Values

SAVE

public static final int SAVE
FileDialog style constant for save file dialog behavior (value is 1<<13)

See Also:
Constant Field Values

COLOR_WHITE

public static final int COLOR_WHITE
default color white (value is 1)

See Also:
Constant Field Values

COLOR_BLACK

public static final int COLOR_BLACK
default color black (value is 2)

See Also:
Constant Field Values

COLOR_RED

public static final int COLOR_RED
default color red (value is 3)

See Also:
Constant Field Values

COLOR_DARK_RED

public static final int COLOR_DARK_RED
default color dark red (value is 4)

See Also:
Constant Field Values

COLOR_GREEN

public static final int COLOR_GREEN
default color green (value is 5)

See Also:
Constant Field Values

COLOR_DARK_GREEN

public static final int COLOR_DARK_GREEN
default color dark green (value is 6)

See Also:
Constant Field Values

COLOR_YELLOW

public static final int COLOR_YELLOW
default color yellow (value is 7)

See Also:
Constant Field Values

COLOR_DARK_YELLOW

public static final int COLOR_DARK_YELLOW
default color dark yello (value is 8)

See Also:
Constant Field Values

COLOR_BLUE

public static final int COLOR_BLUE
default color blue (value is 9)

See Also:
Constant Field Values

COLOR_DARK_BLUE

public static final int COLOR_DARK_BLUE
default color dark blue (value is 10)

See Also:
Constant Field Values

COLOR_MAGENTA

public static final int COLOR_MAGENTA
default color magenta (value is 11)

See Also:
Constant Field Values

COLOR_DARK_MAGENTA

public static final int COLOR_DARK_MAGENTA
default color dark magenta (value is 12)

See Also:
Constant Field Values

COLOR_CYAN

public static final int COLOR_CYAN
default color cyan (value is 13)

See Also:
Constant Field Values

COLOR_DARK_CYAN

public static final int COLOR_DARK_CYAN
default color dark cyan (value is 14)

See Also:
Constant Field Values

COLOR_GRAY

public static final int COLOR_GRAY
default color gray (value is 15)

See Also:
Constant Field Values

COLOR_DARK_GRAY

public static final int COLOR_DARK_GRAY
default color dark gray (value is 16)

See Also:
Constant Field Values

COLOR_WIDGET_DARK_SHADOW

public static final int COLOR_WIDGET_DARK_SHADOW
system color used to paint dark shadow areas (value is 17)

See Also:
Constant Field Values

COLOR_WIDGET_NORMAL_SHADOW

public static final int COLOR_WIDGET_NORMAL_SHADOW
system color used to paint normal shadow areas (value is 18)

See Also:
Constant Field Values

COLOR_WIDGET_LIGHT_SHADOW

public static final int COLOR_WIDGET_LIGHT_SHADOW
system color used to paint light shadow areas (value is 19)

See Also:
Constant Field Values

COLOR_WIDGET_HIGHLIGHT_SHADOW

public static final int COLOR_WIDGET_HIGHLIGHT_SHADOW
system color used to paint highlight shadow areas (value is 20)

See Also:
Constant Field Values

COLOR_WIDGET_FOREGROUND

public static final int COLOR_WIDGET_FOREGROUND
system color used to paint foreground areas (value is 21)

See Also:
Constant Field Values

COLOR_WIDGET_BACKGROUND

public static final int COLOR_WIDGET_BACKGROUND
system color used to paint background areas (value is 22)

See Also:
Constant Field Values

COLOR_WIDGET_BORDER

public static final int COLOR_WIDGET_BORDER
system color used to paint border areas (value is 23)

See Also:
Constant Field Values

COLOR_LIST_FOREGROUND

public static final int COLOR_LIST_FOREGROUND
system color used to paint list foreground areas (value is 24)

See Also:
Constant Field Values

COLOR_LIST_BACKGROUND

public static final int COLOR_LIST_BACKGROUND
system color used to paint list background areas (value is 25)

See Also:
Constant Field Values

COLOR_LIST_SELECTION

public static final int COLOR_LIST_SELECTION
system color used to paint list selection background areas (value is 26)

See Also:
Constant Field Values

COLOR_LIST_SELECTION_TEXT

public static final int COLOR_LIST_SELECTION_TEXT
system color used to paint list selected text (value is 27)

See Also:
Constant Field Values

COLOR_INFO_FOREGROUND

public static final int COLOR_INFO_FOREGROUND
system color used to paint tooltip text (value is 28)

See Also:
Constant Field Values

COLOR_INFO_BACKGROUND

public static final int COLOR_INFO_BACKGROUND
system color used to paint tooltip background areas (value is 29)

See Also:
Constant Field Values

COLOR_TITLE_FOREGROUND

public static final int COLOR_TITLE_FOREGROUND
system color used to paint title text (value is 30)

See Also:
Constant Field Values

COLOR_TITLE_BACKGROUND

public static final int COLOR_TITLE_BACKGROUND
system color used to paint title background areas (value is 31)

See Also:
Constant Field Values

COLOR_TITLE_BACKGROUND_GRADIENT

public static final int COLOR_TITLE_BACKGROUND_GRADIENT
system color used to paint title background gradient (value is 32)

See Also:
Constant Field Values

COLOR_TITLE_INACTIVE_FOREGROUND

public static final int COLOR_TITLE_INACTIVE_FOREGROUND
system color used to paint inactive title text (value is 33)

See Also:
Constant Field Values

COLOR_TITLE_INACTIVE_BACKGROUND

public static final int COLOR_TITLE_INACTIVE_BACKGROUND
system color used to paint inactive title background areas (value is 34)

See Also:
Constant Field Values

COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT

public static final int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT
system color used to paint inactive title background gradient (value is 35)

See Also:
Constant Field Values

DRAW_TRANSPARENT

public static final int DRAW_TRANSPARENT
draw constant indicating whether the drawing operation should fill the background (value is 1<<0)

See Also:
Constant Field Values

DRAW_DELIMITER

public static final int DRAW_DELIMITER
draw constant indicating whether the string drawing operation should handle line-delimeters (value is 1<<1)

See Also:
Constant Field Values

DRAW_TAB

public static final int DRAW_TAB
draw constant indicating whether the string drawing operation should expand TAB characters (value is 1<<2)

See Also:
Constant Field Values

DRAW_MNEMONIC

public static final int DRAW_MNEMONIC
draw constant indicating whether the string drawing operation should handle mnemonics (value is 1<<3)

See Also:
Constant Field Values

ERROR_UNSPECIFIED

public static final int ERROR_UNSPECIFIED
SWT error constant indicating that no error number was specified (value is 1)

See Also:
Constant Field Values

ERROR_NO_HANDLES

public static final int ERROR_NO_HANDLES
SWT error constant indicating that no more handles for an operating system resource are available (value is 2)

See Also:
Constant Field Values

ERROR_NO_MORE_CALLBACKS

public static final int ERROR_NO_MORE_CALLBACKS
SWT error constant indicating that no more callback resources are available (value is 3)

See Also:
Constant Field Values

ERROR_NULL_ARGUMENT

public static final int ERROR_NULL_ARGUMENT
SWT error constant indicating that a null argument was passed in (value is 4)

See Also:
Constant Field Values

ERROR_INVALID_ARGUMENT

public static final int ERROR_INVALID_ARGUMENT
SWT error constant indicating that an invalid argument was passed in (value is 5)

See Also:
Constant Field Values

ERROR_INVALID_RANGE

public static final int ERROR_INVALID_RANGE
SWT error constant indicating that a value was found to be outside the allowable range (value is 6)

See Also:
Constant Field Values

ERROR_CANNOT_BE_ZERO

public static final int ERROR_CANNOT_BE_ZERO
SWT error constant indicating that a value which can not be zero was found to be (value is 7)

See Also:
Constant Field Values

ERROR_CANNOT_GET_ITEM

public static final int ERROR_CANNOT_GET_ITEM
SWT error constant indicating that the underlying operating system was unable to provide the value of an item (value is 8)

See Also:
Constant Field Values

ERROR_CANNOT_GET_SELECTION

public static final int ERROR_CANNOT_GET_SELECTION
SWT error constant indicating that the underlying operating system was unable to provide the selection (value is 9)

See Also:
Constant Field Values

ERROR_CANNOT_GET_ITEM_HEIGHT

public static final int ERROR_CANNOT_GET_ITEM_HEIGHT
SWT error constant indicating that the underlying operating system was unable to provide the height of an item (value is 11)

See Also:
Constant Field Values

ERROR_CANNOT_GET_TEXT

public static final int ERROR_CANNOT_GET_TEXT
SWT error constant indicating that the underlying operating system was unable to provide the text of a widget (value is 12)

See Also:
Constant Field Values

ERROR_CANNOT_SET_TEXT

public static final int ERROR_CANNOT_SET_TEXT
SWT error constant indicating that the underlying operating system was unable to set the text of a widget (value is 13)

See Also:
Constant Field Values

ERROR_ITEM_NOT_ADDED

public static final int ERROR_ITEM_NOT_ADDED
SWT error constant indicating that the underlying operating system was unable to add an item (value is 14)

See Also:
Constant Field Values

ERROR_ITEM_NOT_REMOVED

public static final int ERROR_ITEM_NOT_REMOVED
SWT error constant indicating that the underlying operating system was unable to remove an item (value is 15)

See Also:
Constant Field Values

ERROR_NOT_IMPLEMENTED

public static final int ERROR_NOT_IMPLEMENTED
SWT error constant indicating that a particular feature has not been implemented on this platform (value is 20)

See Also:
Constant Field Values

ERROR_MENU_NOT_DROP_DOWN

public static final int ERROR_MENU_NOT_DROP_DOWN
SWT error constant indicating that a menu which needed to have the drop down style had some other style instead (value is 21)

See Also:
Constant Field Values

ERROR_THREAD_INVALID_ACCESS

public static final int ERROR_THREAD_INVALID_ACCESS
SWT error constant indicating that an attempt was made to invoke an SWT operation which can only be executed by the user-interface thread from some other thread (value is 22)

See Also:
Constant Field Values

ERROR_WIDGET_DISPOSED

public static final int ERROR_WIDGET_DISPOSED
SWT error constant indicating that an attempt was made to invoke an SWT operation using a widget which had already been disposed. (value is 24)

See Also:
Constant Field Values

ERROR_MENUITEM_NOT_CASCADE

public static final int ERROR_MENUITEM_NOT_CASCADE
SWT error constant indicating that a menu item which needed to have the cascade style had some other style instead (value is 27)

See Also:
Constant Field Values

ERROR_CANNOT_SET_SELECTION

public static final int ERROR_CANNOT_SET_SELECTION
SWT error constant indicating that the underlying operating system was unable to set the selection of a widget (value is 28)

See Also:
Constant Field Values

ERROR_CANNOT_SET_MENU

public static final int ERROR_CANNOT_SET_MENU
SWT error constant indicating that the underlying operating system was unable to set the menu (value is 29)

See Also:
Constant Field Values

ERROR_CANNOT_SET_ENABLED

public static final int ERROR_CANNOT_SET_ENABLED
SWT error constant indicating that the underlying operating system was unable to set the enabled state (value is 30)

See Also:
Constant Field Values

ERROR_CANNOT_GET_ENABLED

public static final int ERROR_CANNOT_GET_ENABLED
SWT error constant indicating that the underlying operating system was unable to provide enabled/disabled state information (value is 31)

See Also:
Constant Field Values

ERROR_INVALID_PARENT

public static final int ERROR_INVALID_PARENT
SWT error constant indicating that a provided widget can not be used as a parent in the current operation (value is 32)

See Also:
Constant Field Values

ERROR_MENU_NOT_BAR

public static final int ERROR_MENU_NOT_BAR
SWT error constant indicating that a menu which needed to have the menu bar style had some other style instead (value is 33)

See Also:
Constant Field Values

ERROR_CANNOT_GET_COUNT

public static final int ERROR_CANNOT_GET_COUNT
SWT error constant indicating that the underlying operating system was unable to provide count information (value is 36)

See Also:
Constant Field Values

ERROR_MENU_NOT_POP_UP

public static final int ERROR_MENU_NOT_POP_UP
SWT error constant indicating that a menu which needed to have the pop up menu style had some other style instead (value is 37)

See Also:
Constant Field Values

ERROR_UNSUPPORTED_DEPTH

public static final int ERROR_UNSUPPORTED_DEPTH
SWT error constant indicating that a graphics operation was attempted with an image of an unsupported depth (value is 38)

See Also:
Constant Field Values

ERROR_IO

public static final int ERROR_IO
SWT error constant indicating that an input/output operation failed during the execution of an SWT operation (value is 39)

See Also:
Constant Field Values

ERROR_INVALID_IMAGE

public static final int ERROR_INVALID_IMAGE
SWT error constant indicating that a graphics operation was attempted with an image having an invalid format (value is 40)

See Also:
Constant Field Values

ERROR_UNSUPPORTED_FORMAT

public static final int ERROR_UNSUPPORTED_FORMAT
SWT error constant indicating that a graphics operation was attempted with an image having a valid but unsupported format (value is 42)

See Also:
Constant Field Values

ERROR_INVALID_SUBCLASS

public static final int ERROR_INVALID_SUBCLASS
SWT error constant indicating that an attempt was made to subclass an SWT widget class without implementing the checkSubclass() method. For additional information see the comment in Widget.checkSubclass() (value is 43)

See Also:
Widget.checkSubclass(), Constant Field Values

ERROR_GRAPHIC_DISPOSED

public static final int ERROR_GRAPHIC_DISPOSED
SWT error constant indicating that an attempt was made to invoke an SWT operation using a graphics object which had already been disposed. (value is 44)

See Also:
Constant Field Values

ERROR_DEVICE_DISPOSED

public static final int ERROR_DEVICE_DISPOSED
SWT error constant indicating that an attempt was made to invoke an SWT operation using a device which had already been disposed. (value is 45)

See Also:
Constant Field Values

ERROR_FAILED_EXEC

public static final int ERROR_FAILED_EXEC
SWT error constant indicating that an exception happened when executing a runnable. (value is 46)

See Also:
Constant Field Values

ERROR_FAILED_LOAD_LIBRARY

public static final int ERROR_FAILED_LOAD_LIBRARY
SWT error constant indicating that an unsatisfied link error occured while attempting to load a library. (value is 47)

See Also:
Constant Field Values

TRAVERSE_NONE

public static final int TRAVERSE_NONE
traversal event detail field value indicating that no traversal action should be taken. (value is 0)

See Also:
Constant Field Values

TRAVERSE_ESCAPE

public static final int TRAVERSE_ESCAPE
traversal event detail field value indicating that the key which designates that a dialog should be cancelled was pressed; typically, this is the ESC key (value is 1<<1)

See Also:
Constant Field Values

TRAVERSE_RETURN

public static final int TRAVERSE_RETURN
traversal event detail field value indicating that the key which activates the default button in a dialog was pressed; typically, this is the ENTER key (value is 1<<2)

See Also:
Constant Field Values

TRAVERSE_TAB_PREVIOUS

public static final int TRAVERSE_TAB_PREVIOUS
traversal event detail field value indicating that the key which designates that focus should be given to the previous tab group was pressed; typically, this is the SHIFT-TAB key sequence (value is 1<<3)

See Also:
Constant Field Values

TRAVERSE_TAB_NEXT

public static final int TRAVERSE_TAB_NEXT
traversal event detail field value indicating that the key which designates that focus should be given to the next tab group was pressed; typically, this is the TAB key (value is 1<<4)

See Also:
Constant Field Values

TRAVERSE_ARROW_PREVIOUS

public static final int TRAVERSE_ARROW_PREVIOUS
traversal event detail field value indicating that the key which designates that focus should be given to the previous tab item was pressed; typically, this is either the LEFT-ARROW or UP-ARROW keys (value is 1<<5)

See Also:
Constant Field Values

TRAVERSE_ARROW_NEXT

public static final int TRAVERSE_ARROW_NEXT
traversal event detail field value indicating that the key which designates that focus should be given to the previous tab item was pressed; typically, this is either the RIGHT-ARROW or DOWN-ARROW keys (value is 1<<6)

See Also:
Constant Field Values

TRAVERSE_MNEMONIC

public static final int TRAVERSE_MNEMONIC
traversal event detail field value indicating that a mnemonic key sequence was pressed (value is 1<<7)

See Also:
Constant Field Values

TRAVERSE_PAGE_PREVIOUS

public static final int TRAVERSE_PAGE_PREVIOUS
traversal event detail field value indicating that the key which designates that the previous page of a multi-page window should be shown was pressed; typically, this is the CTRL-PAGEUP key sequence (value is 1<<8)

See Also:
Constant Field Values

TRAVERSE_PAGE_NEXT

public static final int TRAVERSE_PAGE_NEXT
traversal event detail field value indicating that the key which designates that the next page of a multi-page window should be shown was pressed; typically, this is the CTRL-PAGEDOWN key sequence (value is 1<<9)

See Also:
Constant Field Values

BITMAP

public static final int BITMAP
constant indicating that an image or operation is of type bitmap (value is 0)

See Also:
Constant Field Values

ICON

public static final int ICON
constant indicating that an image or operation is of type icon (value is 1)

See Also:
Constant Field Values

IMAGE_COPY

public static final int IMAGE_COPY
Image constructor argument indicating that the new image should be a copy of the image provided as an argument (value is 0)

See Also:
Constant Field Values

IMAGE_DISABLE

public static final int IMAGE_DISABLE
Image constructor argument indicating that the new image should have the appearance of a "disabled" (using the platform's rules for how this should look) copy of the image provided as an argument (value is 1)

See Also:
Constant Field Values

IMAGE_GRAY

public static final int IMAGE_GRAY
Image constructor argument indicating that the new image should have the appearance of a "gray scaled" copy of the image provided as an argument (value is 2)

See Also:
Constant Field Values

NORMAL

public static final int NORMAL
font style constant indicating a normal weight, non-italic font (value is 0)

See Also:
Constant Field Values

BOLD

public static final int BOLD
font style constant indicating a bold weight font (value is 1<<0)

See Also:
Constant Field Values

ITALIC

public static final int ITALIC
font style constant indicating an italic font (value is 1<<1)

See Also:
Constant Field Values

CURSOR_ARROW

public static final int CURSOR_ARROW
system arrow cursor (value is 0)

See Also:
Constant Field Values

CURSOR_WAIT

public static final int CURSOR_WAIT
system wait cursor (value is 1)

See Also:
Constant Field Values

CURSOR_CROSS

public static final int CURSOR_CROSS
system cross hair cursor (value is 2)

See Also:
Constant Field Values

CURSOR_APPSTARTING

public static final int CURSOR_APPSTARTING
system app startup cursor (value is 3)

See Also:
Constant Field Values

CURSOR_HELP

public static final int CURSOR_HELP
system help cursor (value is 4)

See Also:
Constant Field Values

CURSOR_SIZEALL

public static final int CURSOR_SIZEALL
system resize all directions cursor (value is 5)

See Also:
Constant Field Values

CURSOR_SIZENESW

public static final int CURSOR_SIZENESW
system resize north-east-south-west cursor (value is 6)

See Also:
Constant Field Values

CURSOR_SIZENS

public static final int CURSOR_SIZENS
system resize north-south cursor (value is 7)

See Also:
Constant Field Values

CURSOR_SIZENWSE

public static final int CURSOR_SIZENWSE
system resize north-west-south-east cursor (value is 8)

See Also:
Constant Field Values

CURSOR_SIZEWE

public static final int CURSOR_SIZEWE
system resize west-east cursor (value is 9)

See Also:
Constant Field Values

CURSOR_SIZEN

public static final int CURSOR_SIZEN
system resize north cursor (value is 10)

See Also:
Constant Field Values

CURSOR_SIZES

public static final int CURSOR_SIZES
system resize south cursor (value is 11)

See Also:
Constant Field Values

CURSOR_SIZEE

public static final int CURSOR_SIZEE
system resize east cursor (value is 12)

See Also:
Constant Field Values

CURSOR_SIZEW

public static final int CURSOR_SIZEW
system resize west cursor (value is 13)

See Also:
Constant Field Values

CURSOR_SIZENE

public static final int CURSOR_SIZENE
system resize north-east cursor (value is 14)

See Also:
Constant Field Values

CURSOR_SIZESE

public static final int CURSOR_SIZESE
system resize south-east cursor (value is 15)

See Also:
Constant Field Values

CURSOR_SIZESW

public static final int CURSOR_SIZESW
system resize south-west cursor (value is 16)

See Also:
Constant Field Values

CURSOR_SIZENW

public static final int CURSOR_SIZENW
system resize north-west cursor (value is 17)

See Also:
Constant Field Values

CURSOR_UPARROW

public static final int CURSOR_UPARROW
system up arrow cursor (value is 18)

See Also:
Constant Field Values

CURSOR_IBEAM

public static final int CURSOR_IBEAM
system i-beam cursor (value is 19)

See Also:
Constant Field Values

CURSOR_NO

public static final int CURSOR_NO
system "not allowed" cursor (value is 20)

See Also:
Constant Field Values

CURSOR_HAND

public static final int CURSOR_HAND
system hand cursor (value is 21)

See Also:
Constant Field Values

LINE_SOLID

public static final int LINE_SOLID
line drawing style for solid lines (value is 1)

See Also:
Constant Field Values

LINE_DASH

public static final int LINE_DASH
line drawing style for dashed lines (value is 2)

See Also:
Constant Field Values

LINE_DOT

public static final int LINE_DOT
line drawing style for dotted lines (value is 3)

See Also:
Constant Field Values

LINE_DASHDOT

public static final int LINE_DASHDOT
line drawing style for alternating dash-dot lines (value is 4)

See Also:
Constant Field Values

LINE_DASHDOTDOT

public static final int LINE_DASHDOTDOT
line drawing style for dash-dot-dot lines (value is 5)

See Also:
Constant Field Values

IMAGE_UNDEFINED

public static final int IMAGE_UNDEFINED
image format constant indicating an unknown image type (value is -1)

See Also:
Constant Field Values

IMAGE_BMP

public static final int IMAGE_BMP
image format constant indicating a Windows BMP format image (value is 0)

See Also:
Constant Field Values

IMAGE_BMP_RLE

public static final int IMAGE_BMP_RLE
image format constant indicating a run-length encoded Windows BMP format image (value is 1)

See Also:
Constant Field Values

IMAGE_GIF

public static final int IMAGE_GIF
image format constant indicating a GIF format image (value is 2)

See Also:
Constant Field Values

IMAGE_ICO

public static final int IMAGE_ICO
image format constant indicating a ICO format image (value is 3)

See Also:
Constant Field Values

IMAGE_JPEG

public static final int IMAGE_JPEG
image format constant indicating a JPEG format image (value is 4)

See Also:
Constant Field Values

IMAGE_PNG

public static final int IMAGE_PNG
image format constant indicating a PNG format image (value is 5)

See Also:
Constant Field Values

DM_UNSPECIFIED

public static final int DM_UNSPECIFIED
GIF image disposal method constants indicating that the disposal method is unspecified (value is 0)

See Also:
Constant Field Values

DM_FILL_NONE

public static final int DM_FILL_NONE
GIF image disposal method constants indicating that the disposal method is to do nothing. That is, to leave the previous image in place (value is 1)

See Also:
Constant Field Values

DM_FILL_BACKGROUND

public static final int DM_FILL_BACKGROUND
GIF image disposal method constants indicating that the the previous images should be covered with the background color before displaying the next image (value is 2)

See Also:
Constant Field Values

DM_FILL_PREVIOUS

public static final int DM_FILL_PREVIOUS
GIF image disposal method constants indicating that the disposal method is to restore the previous picture (value is 3)

See Also:
Constant Field Values

TRANSPARENCY_NONE

public static final int TRANSPARENCY_NONE
image transparency constant indicating that the image contains no transparency information (value is 0)

See Also:
Constant Field Values

TRANSPARENCY_ALPHA

public static final int TRANSPARENCY_ALPHA
image transparency constant indicating that the image contains alpha transparency information (value is 1<<0)

See Also:
Constant Field Values

TRANSPARENCY_MASK

public static final int TRANSPARENCY_MASK
image transparency constant indicating that the image contains a transparency mask (value is 1<<1)

See Also:
Constant Field Values

TRANSPARENCY_PIXEL

public static final int TRANSPARENCY_PIXEL
image transparency constant indicating that the image contains a transparent pixel (value is 1<<2)

See Also:
Constant Field Values
Constructor Detail

SWT

public SWT()
Method Detail

getMessage

public static String getMessage(String key)
Returns the NLS'ed message for the given argument.

Parameters:
key - the key to look up
Returns:
the message for the given key
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the key is null

getPlatform

public static String getPlatform()
Returns the SWT platform name. Examples: "win32", "motif", "gtk", "photon"

Returns:
the SWT platform name

getVersion

public static int getVersion()
Returns the SWT version number as an integer. Example: "SWT051" == 51

Returns:
the SWT version number

error

public static void error(int code)
Throws an appropriate exception based on the passed in error code.

Parameters:
code - the SWT error code

error

public static void error(int code,
                         Throwable throwable)
Throws an appropriate exception based on the passed in error code. The throwable argument should be either null, or the throwable which caused SWT to throw an exception.

In SWT, errors are reported by throwing one of three exceptions:

java.lang.IllegalArgumentException
thrown whenever one of the API methods is invoked with an illegal argument
org.eclipse.swt.SWTException (extends java.lang.RuntimeException)
thrown whenever a recoverable error happens internally in SWT
org.eclipse.swt.SWTError (extends java.lang.Error)
thrown whenever a non-recoverable error happens internally in SWT
This method provides the logic which maps between error codes and one of the above exceptions.

Parameters:
code - the SWT error code.
throwable - the exception which caused the error to occur.
See Also:
SWTError, SWTException, IllegalArgumentException

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.