Home » Eclipse-SWT-3.5.1 » org.eclipse.swt » [javadoc | source]
org.eclipse.swt
public class: SWT [javadoc | source]
java.lang.Object
   org.eclipse.swt.SWT

Direct Known Subclasses:
    OLE

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
public static final  int None    The null event type (value is 0).
    since: 3.0 -
 
public static final  int KeyDown    The key down event type (value is 1). 
public static final  int KeyUp    The key up event type (value is 2). 
public static final  int MouseDown    The mouse down event type (value is 3). 
public static final  int MouseUp    The mouse up event type (value is 4). 
public static final  int MouseMove    The mouse move event type (value is 5). 
public static final  int MouseEnter    The mouse enter event type (value is 6). 
public static final  int MouseExit    The mouse exit event type (value is 7). 
public static final  int MouseDoubleClick    The mouse double click event type (value is 8). 
public static final  int Paint    The paint event type (value is 9). 
public static final  int Move    The move event type (value is 10).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Control#addControlListener
    org.eclipse.swt.widgets.TableColumn#addControlListener
    org.eclipse.swt.widgets.Tracker#addControlListener
    org.eclipse.swt.widgets.TreeColumn#addControlListener
    org.eclipse.swt.events.ControlListener#controlMoved
    org.eclipse.swt.events.ControlEvent
 
public static final  int Resize    The resize event type (value is 11).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Control#addControlListener
    org.eclipse.swt.widgets.TableColumn#addControlListener
    org.eclipse.swt.widgets.Tracker#addControlListener
    org.eclipse.swt.widgets.TreeColumn#addControlListener
    org.eclipse.swt.events.ControlListener#controlResized
    org.eclipse.swt.events.ControlEvent
 
public static final  int Dispose    The dispose event type (value is 12). 
public static final  int Selection    The selection event type (value is 13).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Button#addSelectionListener
    org.eclipse.swt.widgets.Combo#addSelectionListener
    org.eclipse.swt.widgets.CoolItem#addSelectionListener
    org.eclipse.swt.widgets.Link#addSelectionListener
    org.eclipse.swt.widgets.List#addSelectionListener
    org.eclipse.swt.widgets.MenuItem#addSelectionListener
    org.eclipse.swt.widgets.Sash#addSelectionListener
    org.eclipse.swt.widgets.Scale#addSelectionListener
    org.eclipse.swt.widgets.ScrollBar#addSelectionListener
    org.eclipse.swt.widgets.Slider#addSelectionListener
    org.eclipse.swt.widgets.TabFolder#addSelectionListener
    org.eclipse.swt.widgets.Table#addSelectionListener
    org.eclipse.swt.widgets.TableColumn#addSelectionListener
    org.eclipse.swt.widgets.ToolItem#addSelectionListener
    org.eclipse.swt.widgets.TrayItem#addSelectionListener
    org.eclipse.swt.widgets.Tree#addSelectionListener
    org.eclipse.swt.widgets.TreeColumn#addSelectionListener
    org.eclipse.swt.events.SelectionListener#widgetSelected
    org.eclipse.swt.events.SelectionEvent
 
public static final  int DefaultSelection    The default selection event type (value is 14).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Combo#addSelectionListener
    org.eclipse.swt.widgets.List#addSelectionListener
    org.eclipse.swt.widgets.Spinner#addSelectionListener
    org.eclipse.swt.widgets.Table#addSelectionListener
    org.eclipse.swt.widgets.Text#addSelectionListener
    org.eclipse.swt.widgets.TrayItem#addSelectionListener
    org.eclipse.swt.widgets.Tree#addSelectionListener
    org.eclipse.swt.events.SelectionListener#widgetDefaultSelected
    org.eclipse.swt.events.SelectionEvent
 
public static final  int FocusIn    The focus in event type (value is 15). 
public static final  int FocusOut    The focus out event type (value is 16). 
public static final  int Expand    The expand event type (value is 17). 
public static final  int Collapse    The collapse event type (value is 18). 
public static final  int Iconify    The iconify event type (value is 19). 
public static final  int Deiconify    The de-iconify event type (value is 20). 
public static final  int Close    The close event type (value is 21). 
public static final  int Show    The show event type (value is 22). 
public static final  int Hide    The hide event type (value is 23). 
public static final  int Modify    The modify event type (value is 24).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Combo#addModifyListener
    org.eclipse.swt.widgets.Spinner#addModifyListener
    org.eclipse.swt.widgets.Text#addModifyListener
    org.eclipse.swt.events.ModifyListener#modifyText
    org.eclipse.swt.events.ModifyEvent
 
public static final  int Verify    The verify event type (value is 25).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.custom.CCombo#addVerifyListener
    org.eclipse.swt.widgets.Combo#addVerifyListener
    org.eclipse.swt.custom.StyledText#addVerifyListener
    org.eclipse.swt.widgets.Text#addVerifyListener
    org.eclipse.swt.events.VerifyListener#verifyText
    org.eclipse.swt.events.VerifyEvent
 
public static final  int Activate    The activate event type (value is 26). 
public static final  int Deactivate    The deactivate event type (value is 27). 
public static final  int Help    The help event type (value is 28).
    Also see:
    org.eclipse.swt.widgets.Widget#addListener
    org.eclipse.swt.widgets.Display#addFilter
    org.eclipse.swt.widgets.Event
    org.eclipse.swt.widgets.Control#addHelpListener
    org.eclipse.swt.widgets.Menu#addHelpListener
    org.eclipse.swt.widgets.MenuItem#addHelpListener
    org.eclipse.swt.events.HelpListener#helpRequested
    org.eclipse.swt.events.HelpEvent
 
public static final  int DragDetect    The drag detect event type (value is 29). 
public static final  int Arm    The arm event type (value is 30). 
public static final  int Traverse    The traverse event type (value is 31). 
public static final  int MouseHover    The mouse hover event type (value is 32). 
public static final  int HardKeyDown    The hardware key down event type (value is 33). 
public static final  int HardKeyUp    The hardware key up event type (value is 34). 
public static final  int MenuDetect    The menu detect event type (value is 35). 
public static final  int SetData    The set data event type (value is 36). 
public static final  int MouseWheel    The mouse wheel event type (value is 37). 
public static final  int Settings    The settings changed event type (value is 39).

The settings changed event is sent when an operating system property, such as a system font or color, has been changed. The event occurs after the property has been changed, but before any widget is redrawn. Applications that cache operating system properties can use this event to update their caches. A specific property change can be detected by querying the new value of a property and comparing it with the equivalent cached value. The operating system automatically redraws and lays out all widgets after this event is sent.

 
public static final  int EraseItem    The erase item event type (value is 40). 
public static final  int MeasureItem    The measure item event type (value is 41). 
public static final  int PaintItem    The paint item event type (value is 42). 
public static final  int ImeComposition    The IME composition event type (value is 43).

The IME composition event is sent to allow custom text editors to implement in-line editing of international text.

The detail field indicates the action to be taken:

 
public static final  int COMPOSITION_CHANGED    The IME composition event detail that indicates a change in the IME composition. The text field of the event is the new composition text. The start and end indicate the offsets where the composition text should be inserted. The styles and ranges are stored in the IME object (value is 1).
    Also see:
    SWT#ImeComposition
    since: 3.4 -
 
public static final  int COMPOSITION_OFFSET    The IME composition event detail that indicates that the IME needs the offset for a given location. The x and y fields of the event are used by the application to determine the offset. The index field of the event should be set to the text offset at that location. The count field should be set to indicate whether the location is closer to the leading edge (0) or the trailing edge (1) (value is 2).
    Also see:
    SWT#ImeComposition
    org.eclipse.swt.graphics.TextLayout#getOffset(int, int, int[])
    since: 3.4 -
 
public static final  int COMPOSITION_SELECTION    The IME composition event detail that indicates that IME needs the selected text and its start and end offsets (value is 3).
    Also see:
    SWT#ImeComposition
    since: 3.4 -
 
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). 
public static final  int SELECTED    Event detail field that indicates a user-interface component state is selected (value is 1<<1).
    since: 3.2 -
 
public static final  int FOCUSED    Event detail field that indicates a user-interface component state is focused (value is 1<<2).
    since: 3.2 -
 
public static final  int BACKGROUND    Event detail field that indicates a user-interface component draws the background (value is 1<<3).
    since: 3.2 -
 
public static final  int FOREGROUND    Event detail field that indicates a user-interface component draws the foreground (value is 1<<4).
    since: 3.2 -
 
public static final  int HOT    Event detail field that indicates a user-interface component state is hot (value is 1<<5).
    since: 3.3 -
 
public static final  int TRAVERSE_NONE    Traversal event detail field value indicating that no traversal action should be taken (value is 0). 
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). 
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). 
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). 
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). 
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). 
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). 
public static final  int TRAVERSE_MNEMONIC    Traversal event detail field value indicating that a mnemonic key sequence was pressed (value is 1<<7). 
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). 
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). 
public static final  int NONE    A constant known to be zero (0), typically used in operations which take bit flags to indicate that "no bits are set". 
public static final  int NULL    A constant known to be zero (0), used in operations which take pointers to indicate a null argument. 
public static final  int DEFAULT    Indicates that a default should be used (value is -1). 
public static final  int OFF    Indicates that a property is off (value is 0).
    since: 3.1 -
 
public static final  int ON    Indicates that a property is on (value is 1).
    since: 3.1 -
 
public static final  int LOW    Indicates low quality (value is 1).
    since: 3.1 -
 
public static final  int HIGH    Indicates high quality (value is 2).
    since: 3.1 -
 
public static final  int BAR    Style constant for menu bar behavior (value is 1<<1).

Used By:

  • Menu

 
public static final  int DROP_DOWN    Style constant for drop down menu/list behavior (value is 1<<2).
Note that for DateTime this is a HINT.

Used By:

  • Menu
  • ToolItem
  • CoolItem
  • Combo
  • DateTime

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

Used By:

  • Menu

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

Used By:

  • Label
  • MenuItem
  • ToolItem

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

Used By:

  • Button

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

Used By:

  • Button

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

Used By:

  • Button
  • MenuItem
  • ToolItem

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

Used By:

  • Button
  • MenuItem
  • ToolItem

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

Used By:

  • Button
  • MenuItem
  • ToolItem
  • Table
  • Tree

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

Used By:

  • MenuItem

 
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:

  • Text
  • List
  • Table
  • Tree
  • FileDialog

 
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:

  • Text
  • List
  • Table
  • Tree

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

Used By:

  • Combo
  • Text

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

Used By:

  • Label
  • Text
  • ToolBar
  • Spinner

 
public static final  int SEARCH    Style constant for search behavior (value is 1<<7).

Used By:

  • Text

    since: 3.3 -
 
public static final  int SIMPLE    Style constant for simple (not drop down) behavior (value is 1<<6).

Used By:

  • Combo

 
public static final  int PASSWORD    Style constant for password behavior (value is 1<<22).

Used By:

  • Text

    since: 3.0 -
 
public static final  int SHADOW_IN    Style constant for shadow in behavior (value is 1<<2).
Note that this is a HINT.

Used By:

  • Label
  • Group

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

Used By:

  • Label
  • Group
  • ToolBar

 
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:

  • Group

 
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:

  • Group

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

Used By:

  • Label
  • Group

 
public static final  int INDETERMINATE    Style constant for progress bar behavior (value is 1<<1).

Used By:

  • ProgressBar

 
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:

  • Decorations and subclasses

 
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:

  • Decorations and subclasses

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

Used By:

  • Decorations and subclasses
  • Tracker

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

Used By:

  • Decorations and subclasses

 
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:

  • Decorations and subclasses

 
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:

  • Decorations and subclasses

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

Used By:

  • Decorations and subclasses

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

Used By:

  • Decorations and subclasses

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

Used By:

  • Scrollable and subclasses

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

Used By:

  • Scrollable and subclasses

 
public static final  int NO_SCROLL    Style constant for no scrollbar behavior (value is 1<<4).

When neither H_SCROLL or V_SCROLL are specified, controls are free to create the default scroll bars for the control. Using NO_SCROLL overrides the default and forces the control to have no scroll bars. Used By:

  • Tree
  • Table

    since: 3.4 -
 
public static final  int BORDER    Style constant for bordered behavior (value is 1<<11).
Note that this is a HINT.

Used By:

  • Control and subclasses

 
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:

  • Control and subclasses

 
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:

  • Control and subclasses

 
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:

  • Shell and subclasses

 
public static final  int SHEET    Style constant for sheet window behavior (value is 1<<28).

A sheet window is a window intended to be used as a temporary modal dialog that is attached to a parent window. It is typically used to prompt the user before proceeding. The window trim, positioning and general look of a sheet window is platform specific. For example, on the Macintosh, at the time this documentation was written, the window title is not visible.
Note that this is a HINT.

Used By:

  • Dialog and subclasses
  • Shell and subclasses

    since: 3.5 -
 
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:

  • Shell

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

Used By:

  • Shell

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

Used By:

  • Dialog
  • Shell

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

Used By:

  • Dialog
  • Shell

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

Used By:

  • Dialog
  • Shell

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

Used By:

  • Dialog
  • Shell

 
public static final  int HIDE_SELECTION    Style constant for selection hiding behavior when the widget loses focus (value is 1<<15).
Note that this is a HINT.

Used By:

  • Table

 
public static final  int FULL_SELECTION    Style constant for full row selection behavior and selection constant indicating that a full line should be drawn. (value is 1<<16).
Note that for some widgets this is a HINT.

Used By:

  • Table
  • Tree
  • StyledText
  • TextLayout

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

Used By:

  • Button
  • ToolBar

 
public static final  int SMOOTH    Style constant for smooth appearance. (value is 1<<16).
Note that this is a HINT.

Used By:

  • ProgressBar
  • Sash

 
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. 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:

  • Composite

 
public static final  int NO_FOCUS    Style constant for no focus from the mouse behavior (value is 1<<19).

Normally, when the user clicks on a control, focus is assigned to that control, providing the control has no children. Some controls, such as tool bars and sashes, don't normally take focus when the mouse is clicked or accept focus when assigned from within the program. This style allows Composites to implement "no focus" mouse behavior.
Note that this is a HINT.

Used By:

  • Composite

 
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.
Note that this is a HINT.

Used By:

  • Composite

 
public static final  int NO_MERGE_PAINTS    Style constant for no paint event merging behavior (value is 1<<21).
Note that this is a HINT.

Used By:

  • Composite

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

Used By:

  • Composite
  • Menu

 
public static final  int LEFT_TO_RIGHT    Style constant for left to right orientation (value is 1<<25).

When orientation is not explicitly specified, orientation is inherited. This means that children will be assigned the orientation of their parent. To override this behavior and force an orientation for a child, explicitly set the orientation of the child when that child is created.
Note that this is a HINT.

Used By:

  • Control
  • Menu
  • GC

    since: 2.1.2 -
 
public static final  int RIGHT_TO_LEFT    Style constant for right to left orientation (value is 1<<26).

When orientation is not explicitly specified, orientation is inherited. This means that children will be assigned the orientation of their parent. To override this behavior and force an orientation for a child, explicitly set the orientation of the child when that child is created.
Note that this is a HINT.

Used By:

  • Control
  • Menu
  • GC

    since: 2.1.2 -
 
public static final  int MIRRORED    Style constant to indicate coordinate mirroring (value is 1<<27).

Used By:

  • Control
  • Menu

    since: 2.1.2 -
 
public static final  int EMBEDDED    Style constant to allow embedding (value is 1<<24).

Used By:

  • Composite

    since: 3.0 -
 
public static final  int VIRTUAL    Style constant to allow virtual data (value is 1<<28).

Used By:

  • Table
  • Tree

    since: 3.0 -
 
public static final  int DOUBLE_BUFFERED    Style constant to indicate double buffering (value is 1<<29).

Used By:

  • Control

    since: 3.1 -
 
public static final  int TRANSPARENT    Style constant for transparent behavior (value is 1<<30).

By default, before a widget paints, the client area is filled with the current background. When this style is specified, the background is not filled and widgets that are obscured will draw through.

Used By:

  • Composite

    since: 3.4 - WARNING: THIS API IS UNDER CONSTRUCTION AND SHOULD NOT BE USED
 
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:

  • Button with ARROW style
  • Tracker
  • Table
  • Tree

 
public static final  int UNDERLINE_SINGLE    Style constant to indicate single underline (value is 0).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int UNDERLINE_DOUBLE    Style constant to indicate double underline (value is 1).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int UNDERLINE_ERROR    Style constant to indicate error underline (value is 2).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int UNDERLINE_SQUIGGLE    Style constant to indicate squiggle underline (value is 3).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int UNDERLINE_LINK    Style constant to indicate link underline (value is 0).

If the text color or the underline color are not set in the range the usage of UNDERLINE_LINK will change these colors to the preferred link color of the platform.
Note that clients that use this style, such as StyledText, will include code to track the mouse and change the cursor to the hand cursor when mouse is over the link.

Used By:

  • TextStyle

    since: 3.5 -
 
public static final  int BORDER_SOLID    Style constant to indicate solid border (value is 1).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int BORDER_DASH    Style constant to indicate dashed border (value is 2).

Used By:

  • TextStyle

    since: 3.4 -
 
public static final  int BORDER_DOT    Style constant to indicate dotted border (value is 4).

Used By:

  • TextStyle

    since: 3.4 -
 
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:

  • FormAttachment in a FormLayout

 
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:

  • Button with ARROW style
  • Tracker
  • Table
  • Tree

 
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:

  • FormAttachment in a FormLayout

 
public static final  int LEAD    Style constant for leading alignment (value is 1<<14).

Used By:

  • Button
  • Label
  • TableColumn
  • Tracker
  • FormAttachment in a FormLayout

    since: 2.1.2 -
 
public static final  int LEFT    Style constant for align left behavior (value is 1<<14). This is a synonym for LEAD (value is 1<<14). Newer applications should use LEAD instead of LEFT to make code more understandable on right-to-left platforms. 
public static final  int TRAIL    Style constant for trailing alignment (value is 1<<17).

Used By:

  • Button
  • Label
  • TableColumn
  • Tracker
  • FormAttachment in a FormLayout

    since: 2.1.2 -
 
public static final  int RIGHT    Style constant for align right behavior (value is 1<<17). This is a synonym for TRAIL (value is 1<<17). Newer applications should use TRAIL instead of RIGHT to make code more understandable on right-to-left platforms. 
public static final  int CENTER    Style constant for align center behavior (value is 1<<24).

Used By:

  • Button
  • Label
  • TableColumn
  • FormAttachment in a FormLayout

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

Used By:

  • Label
  • ProgressBar
  • Sash
  • Scale
  • ScrollBar
  • Slider
  • ToolBar
  • FillLayout type
  • RowLayout type

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

Used By:

  • Label
  • ProgressBar
  • Sash
  • Scale
  • ScrollBar
  • Slider
  • ToolBar
  • CoolBar
  • FillLayout type
  • RowLayout type

 
public static final  int DATE    Style constant for date display (value is 1<<5).

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int TIME    Style constant for time display (value is 1<<7).

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int CALENDAR    Style constant for calendar display (value is 1<<10).

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int SHORT    Style constant for short date/time format (value is 1<<15).

A short date displays the month and year. A short time displays hours and minutes.
Note that this is a HINT.

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int MEDIUM    Style constant for medium date/time format (value is 1<<16).

A medium date displays the day, month and year. A medium time displays hours, minutes, and seconds.
Note that this is a HINT.

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int LONG    Style constant for long date/time format (value is 1<<28).

A long date displays the day, month and year. A long time displays hours, minutes, and seconds. The day and month names may be displayed.
Note that this is a HINT.

Used By:

  • DateTime

    since: 3.3 -
 
public static final  int MOZILLA    Style constant specifying that a Browser should use a Mozilla GRE for rendering its content (value is 1<<15).

Used By:

  • Browser

    since: 3.3 -
 
public static final  int BALLOON    Style constant for balloon behavior (value is 1<<12).

Used By:

  • ToolTip

    since: 3.2 -
 
public static final  int BEGINNING    Style constant for vertical alignment or orientation behavior (value is 1).

Used By:

  • GridLayout type

 
public static final  int FILL    Style constant for vertical alignment or orientation behavior (value is 4).

Used By:

  • GridLayout type

 
public static final  int DBCS    Input Method Editor style constant for double byte input behavior (value is 1<<1). 
public static final  int ALPHA    Input Method Editor style constant for alpha input behavior (value is 1<<2). 
public static final  int NATIVE    Input Method Editor style constant for native input behavior (value is 1<<3). 
public static final  int PHONETIC    Input Method Editor style constant for phonetic input behavior (value is 1<<4). 
public static final  int ROMAN    Input Method Editor style constant for romanicized input behavior (value is 1<<5). 
public static final  char BS    ASCII character convenience constant for the backspace character (value is the char '\b'). 
public static final  char CR    ASCII character convenience constant for the carriage return character (value is the char '\r'). 
public static final  char DEL    ASCII character convenience constant for the delete character (value is the char with value 127). 
public static final  char ESC    ASCII character convenience constant for the escape character (value is the char with value 27). 
public static final  char LF    ASCII character convenience constant for the line feed character (value is the char '\n'). 
public static final  char TAB    ASCII character convenience constant for the tab character (value is the char '\t').
    since: 2.1 -
 
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). 
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). 
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). 
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). 
public static final  int COMMAND    Keyboard and/or mouse event mask indicating that the COMMAND key was pushed on the keyboard when the event was generated (value is 1<<22).
    since: 2.1 -
 
public static final  int MODIFIER_MASK    Keyboard and/or mouse event mask indicating all possible keyboard modifiers. To allow for the future, this mask is intended to be used in place of code that references each individual keyboard mask. For example, the following expression will determine whether any modifier is pressed and will continue to work as new modifier masks are added. (stateMask & SWT.MODIFIER_MASK) != 0.
    since: 2.1 -
 
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). 
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). 
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). 
public static final  int BUTTON4    Keyboard and/or mouse event mask indicating that mouse button four was pushed when the event was generated. (value is 1<<23).
    since: 3.1 -
 
public static final  int BUTTON5    Keyboard and/or mouse event mask indicating that mouse button five was pushed when the event was generated. (value is 1<<25).
    since: 3.1 -
 
public static final  int BUTTON_MASK    Keyboard and/or mouse event mask indicating all possible mouse buttons. To allow for the future, this mask is intended to be used in place of code that references each individual button mask. For example, the following expression will determine whether any button is pressed and will continue to work as new button masks are added. (stateMask & SWT.BUTTON_MASK) != 0.
    since: 2.1 -
 
public static final  int MOD1    Keyboard and/or mouse event mask indicating that the MOD1 key was pushed on the keyboard when the event was generated. This is the primary keyboard modifier for the platform.
    since: 2.1 -
 
public static final  int MOD2    Keyboard and/or mouse event mask indicating that the MOD2 key was pushed on the keyboard when the event was generated. This is the secondary keyboard modifier for the platform.
    since: 2.1 -
 
public static final  int MOD3    Keyboard and/or mouse event mask indicating that the MOD3 key was pushed on the keyboard when the event was generated.
    since: 2.1 -
 
public static final  int MOD4    Keyboard and/or mouse event mask indicating that the MOD4 key was pushed on the keyboard when the event was generated.
    since: 2.1 -
 
public static final  int SCROLL_LINE    Constants to indicate line scrolling (value is 1).

Used By:

  • Control

    since: 3.1 -
 
public static final  int SCROLL_PAGE    Constants to indicate page scrolling (value is 2).

Used By:

  • Control

    since: 3.1 -
 
public static final  int KEYCODE_BIT    Accelerator constant used to differentiate a key code from a unicode character. If this bit is set, then the key stroke portion of an accelerator represents a key code. If this bit is not set, then the key stroke portion of an accelerator is a unicode character. The following expression is false: ((SWT.MOD1 | SWT.MOD2 | 'T') & SWT.KEYCODE_BIT) != 0. The following expression is true: ((SWT.MOD3 | SWT.F2) & SWT.KEYCODE_BIT) != 0. (value is (1<<24))
    since: 2.1 -
 
public static final  int KEY_MASK    Accelerator constant used to extract the key stroke portion of an accelerator. The key stroke may be a key code or a unicode value. If the key stroke is a key code KEYCODE_BIT will be set.
    since: 2.1 -
 
public static final  int ARROW_UP    Keyboard event constant representing the UP ARROW key (value is (1<<24)+1). 
public static final  int ARROW_DOWN    Keyboard event constant representing the DOWN ARROW key (value is (1<<24)+2). 
public static final  int ARROW_LEFT    Keyboard event constant representing the LEFT ARROW key (value is (1<<24)+3). 
public static final  int ARROW_RIGHT    Keyboard event constant representing the RIGHT ARROW key (value is (1<<24)+4). 
public static final  int PAGE_UP    Keyboard event constant representing the PAGE UP key (value is (1<<24)+5). 
public static final  int PAGE_DOWN    Keyboard event constant representing the PAGE DOWN key (value is (1<<24)+6). 
public static final  int HOME    Keyboard event constant representing the HOME key (value is (1<<24)+7). 
public static final  int END    Keyboard event constant representing the END key (value is (1<<24)+8). 
public static final  int INSERT    Keyboard event constant representing the INSERT key (value is (1<<24)+9). 
public static final  int F1    Keyboard event constant representing the F1 key (value is (1<<24)+10). 
public static final  int F2    Keyboard event constant representing the F2 key (value is (1<<24)+11). 
public static final  int F3    Keyboard event constant representing the F3 key (value is (1<<24)+12). 
public static final  int F4    Keyboard event constant representing the F4 key (value is (1<<24)+13). 
public static final  int F5    Keyboard event constant representing the F5 key (value is (1<<24)+14). 
public static final  int F6    Keyboard event constant representing the F6 key (value is (1<<24)+15). 
public static final  int F7    Keyboard event constant representing the F7 key (value is (1<<24)+16). 
public static final  int F8    Keyboard event constant representing the F8 key (value is (1<<24)+17). 
public static final  int F9    Keyboard event constant representing the F9 key (value is (1<<24)+18). 
public static final  int F10    Keyboard event constant representing the F10 key (value is (1<<24)+19). 
public static final  int F11    Keyboard event constant representing the F11 key (value is (1<<24)+20). 
public static final  int F12    Keyboard event constant representing the F12 key (value is (1<<24)+21). 
public static final  int F13    Keyboard event constant representing the F13 key (value is (1<<24)+22).
    since: 3.0 -
 
public static final  int F14    Keyboard event constant representing the F14 key (value is (1<<24)+23).
    since: 3.0 -
 
public static final  int F15    Keyboard event constant representing the F15 key (value is (1<<24)+24).
    since: 3.0 -
 
public static final  int KEYPAD_MULTIPLY    Keyboard event constant representing the numeric key pad multiply key (value is (1<<24)+42).
    since: 3.0 -
 
public static final  int KEYPAD_ADD    Keyboard event constant representing the numeric key pad add key (value is (1<<24)+43).
    since: 3.0 -
 
public static final  int KEYPAD_SUBTRACT    Keyboard event constant representing the numeric key pad subtract key (value is (1<<24)+45).
    since: 3.0 -
 
public static final  int KEYPAD_DECIMAL    Keyboard event constant representing the numeric key pad decimal key (value is (1<<24)+46).
    since: 3.0 -
 
public static final  int KEYPAD_DIVIDE    Keyboard event constant representing the numeric key pad divide key (value is (1<<24)+47).
    since: 3.0 -
 
public static final  int KEYPAD_0    Keyboard event constant representing the numeric key pad zero key (value is (1<<24)+48).
    since: 3.0 -
 
public static final  int KEYPAD_1    Keyboard event constant representing the numeric key pad one key (value is (1<<24)+49).
    since: 3.0 -
 
public static final  int KEYPAD_2    Keyboard event constant representing the numeric key pad two key (value is (1<<24)+50).
    since: 3.0 -
 
public static final  int KEYPAD_3    Keyboard event constant representing the numeric key pad three key (value is (1<<24)+51).
    since: 3.0 -
 
public static final  int KEYPAD_4    Keyboard event constant representing the numeric key pad four key (value is (1<<24)+52).
    since: 3.0 -
 
public static final  int KEYPAD_5    Keyboard event constant representing the numeric key pad five key (value is (1<<24)+53).
    since: 3.0 -
 
public static final  int KEYPAD_6    Keyboard event constant representing the numeric key pad six key (value is (1<<24)+54).
    since: 3.0 -
 
public static final  int KEYPAD_7    Keyboard event constant representing the numeric key pad seven key (value is (1<<24)+55).
    since: 3.0 -
 
public static final  int KEYPAD_8    Keyboard event constant representing the numeric key pad eight key (value is (1<<24)+56).
    since: 3.0 -
 
public static final  int KEYPAD_9    Keyboard event constant representing the numeric key pad nine key (value is (1<<24)+57).
    since: 3.0 -
 
public static final  int KEYPAD_EQUAL    Keyboard event constant representing the numeric key pad equal key (value is (1<<24)+61).
    since: 3.0 -
 
public static final  int KEYPAD_CR    Keyboard event constant representing the numeric key pad enter key (value is (1<<24)+80).
    since: 3.0 -
 
public static final  int HELP    Keyboard event constant representing the help key (value is (1<<24)+81). NOTE: The HELP key maps to the key labeled "help", not "F1". If your keyboard does not have a HELP key, you will never see this key press. To listen for help on a control, use SWT.Help.
    Also see:
    SWT#Help
    since: 3.0 -
 
public static final  int CAPS_LOCK    Keyboard event constant representing the caps lock key (value is (1<<24)+82).
    since: 3.0 -
 
public static final  int NUM_LOCK    Keyboard event constant representing the num lock key (value is (1<<24)+83).
    since: 3.0 -
 
public static final  int SCROLL_LOCK    Keyboard event constant representing the scroll lock key (value is (1<<24)+84).
    since: 3.0 -
 
public static final  int PAUSE    Keyboard event constant representing the pause key (value is (1<<24)+85).
    since: 3.0 -
 
public static final  int BREAK    Keyboard event constant representing the break key (value is (1<<24)+86).
    since: 3.0 -
 
public static final  int PRINT_SCREEN    Keyboard event constant representing the print screen key (value is (1<<24)+87).
    since: 3.0 -
 
public static final  int ICON_ERROR    The MessageBox style constant for error icon behavior (value is 1). 
public static final  int ICON_INFORMATION    The MessageBox style constant for information icon behavior (value is 1<<1). 
public static final  int ICON_QUESTION    The MessageBox style constant for question icon behavior (value is 1<<2). 
public static final  int ICON_WARNING    The MessageBox style constant for warning icon behavior (value is 1<<3). 
public static final  int ICON_WORKING    The MessageBox style constant for "working" icon behavior (value is 1<<4). 
public static final  int ICON_SEARCH    The style constant for "search" icon. This style constant is used with Text in combination with SWT.SEARCH (value is 1<<9).
Note that this is a HINT.

Used By:

  • Text

 
public static final  int ICON_CANCEL    The style constant for "cancel" icon. This style constant is used with Text in combination with SWT.SEARCH (value is 1<<8).
Note that this is a HINT.

Used By:

  • Text

 
public static final  int OK    The MessageBox style constant for an OK button; valid combinations are OK, OK|CANCEL (value is 1<<5). 
public static final  int YES    The MessageBox style constant for YES button; valid combinations are YES|NO, YES|NO|CANCEL (value is 1<<6). 
public static final  int NO    The MessageBox style constant for NO button; valid combinations are YES|NO, YES|NO|CANCEL (value is 1<<7). 
public static final  int CANCEL    The MessageBox style constant for a CANCEL button; valid combinations are OK|CANCEL, YES|NO|CANCEL, RETRY|CANCEL (value is 1<<8).

Used By:

  • MessageBox

 
public static final  int ABORT    The MessageBox style constant for an ABORT button; the only valid combination is ABORT|RETRY|IGNORE (value is 1<<9). 
public static final  int RETRY    The MessageBox style constant for a RETRY button; valid combinations are ABORT|RETRY|IGNORE, RETRY|CANCEL (value is 1<<10). 
public static final  int IGNORE    The MessageBox style constant for an IGNORE button; the only valid combination is ABORT|RETRY|IGNORE (value is 1<<11). 
public static final  int OPEN    The FileDialog style constant for open file dialog behavior (value is 1<<12). 
public static final  int SAVE    The FileDialog style constant for save file dialog behavior (value is 1<<13). 
public static final  int INHERIT_NONE    The Composite constant to indicate that an attribute (such as background) is not inherited by the children (value is 0).
    since: 3.2 -
 
public static final  int INHERIT_DEFAULT    The Composite constant to indicate that an attribute (such as background) is inherited by children who choose this value as their "default" (value is 1). For example, a label child will typically choose to inherit the background color of a composite while a list or table will not.
    since: 3.2 -
 
public static final  int INHERIT_FORCE    The Composite constant to indicate that an attribute (such as background) is inherited by all children.
    since: 3.2 -
 
public static final  int COLOR_WHITE    Default color white (value is 1). 
public static final  int COLOR_BLACK    Default color black (value is 2). 
public static final  int COLOR_RED    Default color red (value is 3). 
public static final  int COLOR_DARK_RED    Default color dark red (value is 4). 
public static final  int COLOR_GREEN    Default color green (value is 5). 
public static final  int COLOR_DARK_GREEN    Default color dark green (value is 6). 
public static final  int COLOR_YELLOW    Default color yellow (value is 7). 
public static final  int COLOR_DARK_YELLOW    Default color dark yellow (value is 8). 
public static final  int COLOR_BLUE    Default color blue (value is 9). 
public static final  int COLOR_DARK_BLUE    Default color dark blue (value is 10). 
public static final  int COLOR_MAGENTA    Default color magenta (value is 11). 
public static final  int COLOR_DARK_MAGENTA    Default color dark magenta (value is 12). 
public static final  int COLOR_CYAN    Default color cyan (value is 13). 
public static final  int COLOR_DARK_CYAN    Default color dark cyan (value is 14). 
public static final  int COLOR_GRAY    Default color gray (value is 15). 
public static final  int COLOR_DARK_GRAY    Default color dark gray (value is 16). 
public static final  int COLOR_WIDGET_DARK_SHADOW    System color used to paint dark shadow areas (value is 17). 
public static final  int COLOR_WIDGET_NORMAL_SHADOW    System color used to paint normal shadow areas (value is 18). 
public static final  int COLOR_WIDGET_LIGHT_SHADOW    System color used to paint light shadow areas (value is 19). 
public static final  int COLOR_WIDGET_HIGHLIGHT_SHADOW    System color used to paint highlight shadow areas (value is 20). 
public static final  int COLOR_WIDGET_FOREGROUND    System color used to paint foreground areas (value is 21). 
public static final  int COLOR_WIDGET_BACKGROUND    System color used to paint background areas (value is 22). 
public static final  int COLOR_WIDGET_BORDER    System color used to paint border areas (value is 23). 
public static final  int COLOR_LIST_FOREGROUND    System color used to paint list foreground areas (value is 24). 
public static final  int COLOR_LIST_BACKGROUND    System color used to paint list background areas (value is 25). 
public static final  int COLOR_LIST_SELECTION    System color used to paint list selection background areas (value is 26). 
public static final  int COLOR_LIST_SELECTION_TEXT    System color used to paint list selected text (value is 27). 
public static final  int COLOR_INFO_FOREGROUND    System color used to paint tooltip text (value is 28). 
public static final  int COLOR_INFO_BACKGROUND    System color used to paint tooltip background areas (value is 29). 
public static final  int COLOR_TITLE_FOREGROUND    System color used to paint title text (value is 30). 
public static final  int COLOR_TITLE_BACKGROUND    System color used to paint title background areas (value is 31). 
public static final  int COLOR_TITLE_BACKGROUND_GRADIENT    System color used to paint title background gradient (value is 32). 
public static final  int COLOR_TITLE_INACTIVE_FOREGROUND    System color used to paint inactive title text (value is 33). 
public static final  int COLOR_TITLE_INACTIVE_BACKGROUND    System color used to paint inactive title background areas (value is 34). 
public static final  int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT    System color used to paint inactive title background gradient (value is 35). 
public static final  int DRAW_TRANSPARENT    Draw constant indicating whether the drawing operation should fill the background (value is 1<<0). 
public static final  int DRAW_DELIMITER    Draw constant indicating whether the string drawing operation should handle line-delimiters (value is 1<<1). 
public static final  int DRAW_TAB    Draw constant indicating whether the string drawing operation should expand TAB characters (value is 1<<2). 
public static final  int DRAW_MNEMONIC    Draw constant indicating whether the string drawing operation should handle mnemonics (value is 1<<3). 
public static final  int DELIMITER_SELECTION    Selection constant indicating that a line delimiter should be drawn (value is 1<<17).

Used By:

  • TextLayout

 
public static final  int LAST_LINE_SELECTION    Selection constant indicating that the last line is selected to the end and should be drawn using either a line delimiter or full line selection (value is 1<<20).

Used By:

  • TextLayout

 
public static final  int ERROR_UNSPECIFIED    SWT error constant indicating that no error number was specified (value is 1). 
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). 
public static final  int ERROR_NO_MORE_CALLBACKS    SWT error constant indicating that no more callback resources are available (value is 3). 
public static final  int ERROR_NULL_ARGUMENT    SWT error constant indicating that a null argument was passed in (value is 4). 
public static final  int ERROR_INVALID_ARGUMENT    SWT error constant indicating that an invalid argument was passed in (value is 5). 
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). 
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). 
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). 
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). 
public static final  int ERROR_CANNOT_INVERT_MATRIX    SWT error constant indicating that the matrix is not invertible (value is 10).
    since: 3.1 -
 
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). 
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). 
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). 
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). 
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). 
public static final  int ERROR_NO_GRAPHICS_LIBRARY    SWT error constant indicating that the graphics library is not available (value is 16). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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). 
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 (value is 43). For additional information see the comment in Widget.checkSubclass().
    Also see:
    org.eclipse.swt.widgets.Widget#checkSubclass
 
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). 
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). 
public static final  int ERROR_FAILED_EXEC    SWT error constant indicating that an exception happened when executing a runnable (value is 46). 
public static final  int ERROR_FAILED_LOAD_LIBRARY    SWT error constant indicating that an unsatisfied link error occurred while attempting to load a library (value is 47).
    since: 3.1 -
 
public static final  int ERROR_INVALID_FONT    SWT error constant indicating that a font is not valid (value is 48).
    since: 3.1 -
 
public static final  int ERROR_FUNCTION_DISPOSED    SWT error constant indicating that an attempt was made to use an BrowserFunction object which had already been disposed (value is 49).
    since: 3.5 -
 
public static final  int ERROR_FAILED_EVALUATE    SWT error constant indicating that an exception happened when evaluating a javascript expression (value is 50).
    since: 3.5 -
 
public static final  int ERROR_INVALID_RETURN_VALUE    SWT error constant indicating that an invalid value was returned (value is 51).
    since: 3.5 -
 
public static final  int BITMAP    Constant indicating that an image or operation is of type bitmap (value is 0). 
public static final  int ICON    Constant indicating that an image or operation is of type icon (value is 1). 
public static final  int IMAGE_COPY    The Image constructor argument indicating that the new image should be a copy of the image provided as an argument (value is 0). 
public static final  int IMAGE_DISABLE    The 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). 
public static final  int IMAGE_GRAY    The 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). 
public static final  int ERROR    Constant to indicate an error state (value is 1).

Used By:

  • ProgressBar

    since: 3.4 -
 
public static final  int PAUSED    Constant to a indicate a paused state (value is 4).

Used By:

  • ProgressBar

    since: 3.4 -
 
public static final  int NORMAL    The font style constant indicating a normal weight, non-italic font (value is 0). This constant is also used with ProgressBar to indicate a normal state.

Used By:

  • ProgressBar

 
public static final  int BOLD    The font style constant indicating a bold weight font (value is 1<<0). 
public static final  int ITALIC    The font style constant indicating an italic font (value is 1<<1). 
public static final  int CURSOR_ARROW    System arrow cursor (value is 0). 
public static final  int CURSOR_WAIT    System wait cursor (value is 1). 
public static final  int CURSOR_CROSS    System cross hair cursor (value is 2). 
public static final  int CURSOR_APPSTARTING    System app startup cursor (value is 3). 
public static final  int CURSOR_HELP    System help cursor (value is 4). 
public static final  int CURSOR_SIZEALL    System resize all directions cursor (value is 5). 
public static final  int CURSOR_SIZENESW    System resize north-east-south-west cursor (value is 6). 
public static final  int CURSOR_SIZENS    System resize north-south cursor (value is 7). 
public static final  int CURSOR_SIZENWSE    System resize north-west-south-east cursor (value is 8). 
public static final  int CURSOR_SIZEWE    System resize west-east cursor (value is 9). 
public static final  int CURSOR_SIZEN    System resize north cursor (value is 10). 
public static final  int CURSOR_SIZES    System resize south cursor (value is 11). 
public static final  int CURSOR_SIZEE    System resize east cursor (value is 12). 
public static final  int CURSOR_SIZEW    System resize west cursor (value is 13). 
public static final  int CURSOR_SIZENE    System resize north-east cursor (value is 14). 
public static final  int CURSOR_SIZESE    System resize south-east cursor (value is 15). 
public static final  int CURSOR_SIZESW    System resize south-west cursor (value is 16). 
public static final  int CURSOR_SIZENW    System resize north-west cursor (value is 17). 
public static final  int CURSOR_UPARROW    System up arrow cursor (value is 18). 
public static final  int CURSOR_IBEAM    System i-beam cursor (value is 19). 
public static final  int CURSOR_NO    System "not allowed" cursor (value is 20). 
public static final  int CURSOR_HAND    System hand cursor (value is 21). 
public static final  int CAP_FLAT    Line drawing style for flat end caps (value is 1).
    Also see:
    org.eclipse.swt.graphics.GC#setLineCap(int)
    org.eclipse.swt.graphics.GC#getLineCap()
    since: 3.1 -
 
public static final  int CAP_ROUND    Line drawing style for rounded end caps (value is 2).
    Also see:
    org.eclipse.swt.graphics.GC#setLineCap(int)
    org.eclipse.swt.graphics.GC#getLineCap()
    since: 3.1 -
 
public static final  int CAP_SQUARE    Line drawing style for square end caps (value is 3).
    Also see:
    org.eclipse.swt.graphics.GC#setLineCap(int)
    org.eclipse.swt.graphics.GC#getLineCap()
    since: 3.1 -
 
public static final  int JOIN_MITER    Line drawing style for miter joins (value is 1).
    Also see:
    org.eclipse.swt.graphics.GC#setLineJoin(int)
    org.eclipse.swt.graphics.GC#getLineJoin()
    since: 3.1 -
 
public static final  int JOIN_ROUND    Line drawing style for rounded joins (value is 2).
    Also see:
    org.eclipse.swt.graphics.GC#setLineJoin(int)
    org.eclipse.swt.graphics.GC#getLineJoin()
    since: 3.1 -
 
public static final  int JOIN_BEVEL    Line drawing style for bevel joins (value is 3).
    Also see:
    org.eclipse.swt.graphics.GC#setLineJoin(int)
    org.eclipse.swt.graphics.GC#getLineJoin()
    since: 3.1 -
 
public static final  int LINE_SOLID    Line drawing style for solid lines (value is 1). 
public static final  int LINE_DASH    Line drawing style for dashed lines (value is 2). 
public static final  int LINE_DOT    Line drawing style for dotted lines (value is 3). 
public static final  int LINE_DASHDOT    Line drawing style for alternating dash-dot lines (value is 4). 
public static final  int LINE_DASHDOTDOT    Line drawing style for dash-dot-dot lines (value is 5). 
public static final  int LINE_CUSTOM    Line drawing style for custom dashed lines (value is 6).
    Also see:
    org.eclipse.swt.graphics.GC#setLineDash(int[])
    org.eclipse.swt.graphics.GC#getLineDash()
    since: 3.1 -
 
public static final  int PATH_MOVE_TO    Path constant that represents a "move to" operation (value is 1).
    since: 3.1 -
 
public static final  int PATH_LINE_TO    Path constant that represents a "line to" operation (value is 2).
    since: 3.1 -
 
public static final  int PATH_QUAD_TO    Path constant that represents a "quadratic curve to" operation (value is 3).
    since: 3.1 -
 
public static final  int PATH_CUBIC_TO    Path constant that represents a "cubic curve to" operation (value is 4).
    since: 3.1 -
 
public static final  int PATH_CLOSE    Path constant that represents a "close" operation (value is 5).
    since: 3.1 -
 
public static final  int FILL_EVEN_ODD    Even odd rule for filling operations (value is 1).
    since: 3.1 -
 
public static final  int FILL_WINDING    Winding rule for filling operations (value is 2).
    since: 3.1 -
 
public static final  int IMAGE_UNDEFINED    Image format constant indicating an unknown image type (value is -1). 
public static final  int IMAGE_BMP    Image format constant indicating a Windows BMP format image (value is 0). 
public static final  int IMAGE_BMP_RLE    Image format constant indicating a run-length encoded Windows BMP format image (value is 1). 
public static final  int IMAGE_GIF    Image format constant indicating a GIF format image (value is 2). 
public static final  int IMAGE_ICO    Image format constant indicating a ICO format image (value is 3). 
public static final  int IMAGE_JPEG    Image format constant indicating a JPEG format image (value is 4). 
public static final  int IMAGE_PNG    Image format constant indicating a PNG format image (value is 5). 
public static final  int IMAGE_TIFF    Image format constant indicating a TIFF format image (value is 6). 
public static final  int IMAGE_OS2_BMP    Image format constant indicating an OS/2 BMP format image (value is 7). 
public static final  int DM_UNSPECIFIED    GIF image disposal method constants indicating that the disposal method is unspecified (value is 0). 
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). 
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). 
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). 
public static final  int TRANSPARENCY_NONE    Image transparency constant indicating that the image contains no transparency information (value is 0). 
public static final  int TRANSPARENCY_ALPHA    Image transparency constant indicating that the image contains alpha transparency information (value is 1<<0). 
public static final  int TRANSPARENCY_MASK    Image transparency constant indicating that the image contains a transparency mask (value is 1<<1). 
public static final  int TRANSPARENCY_PIXEL    Image transparency constant indicating that the image contains a transparent pixel (value is 1<<2). 
public static final  int MOVEMENT_CHAR    The character movement type (value is 1<<0). This constant is used to move a text offset over a character.
    Also see:
    org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
    org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
    since: 3.0 -
 
public static final  int MOVEMENT_CLUSTER    The cluster movement type (value is 1<<1). This constant is used to move a text offset over a cluster. A cluster groups one or more characters. A cluster is undivisible, this means that a caret offset can not be placed in the middle of a cluster.
    Also see:
    org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
    org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
    since: 3.0 -
 
public static final  int MOVEMENT_WORD    The word movement type (value is 1<<2). This constant is used to move a text offset over a word. The behavior of this constant depends on the platform and on the direction of the movement. For example, on Windows the stop is always at the start of the word. On GTK and Mac the stop is at the end of the word if the direction is next and at the start of the word if the direction is previous.
    Also see:
    org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
    org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
    since: 3.0 -
 
public static final  int MOVEMENT_WORD_END    The word end movement type (value is 1<<3). This constant is used to move a text offset to the next or previous word end. The behavior of this constant does not depend on the platform.
    Also see:
    org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
    org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
    since: 3.3 -
 
public static final  int MOVEMENT_WORD_START    The word start movement type (value is 1<<4). This constant is used to move a text offset to the next or previous word start. The behavior of this constant does not depend on the platform.
    Also see:
    org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
    org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
    since: 3.3 -
 
Method from org.eclipse.swt.SWT Summary:
error,   error,   error,   findErrorText,   getMessage,   getPlatform,   getVersion
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.eclipse.swt.SWT Detail:
 public static  void error(int code) 
    Throws an appropriate exception based on the passed in error code.
 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.

 public static  void error(int code,
    Throwable throwable,
    String detail) 
    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.

 static String findErrorText(int code) 
    Answers a concise, human readable description of the error code.
 public static String getMessage(String key) 
    Returns the NLS'ed message for the given argument.
 public static String getPlatform() 
    Returns the SWT platform name. Examples: "win32", "motif", "gtk", "photon", "carbon", "cocoa", "wpf"
 public static int getVersion() 
    Returns the SWT version number as an integer. Example: "SWT051" == 51