Eclipse 3.6 - New and Noteworthy in SWT

Milestone M1

Icon support for GTK Text widgets The text widget can now display the search and cancel icons inside the widget. This runs on Linux platforms with a GTK version of 2.16 or greater.

Icon support

Milestone M2

Mozilla Browser Support on Solaris SPARC Mozilla browser support has been added for the Solaris SPARC platform (Solaris 10, GTK+).

Browser.close() API Browser.close() is used to close a Browser, but allows the close to be cancelled by an onbeforeunload handler. See Snippet 326.

Browser close

Multipage TIFF image Support for loading multipage TIFF images is now available.

Key event for F16-F20 Added new constants for key events from F16 to F20.



Horizontal Mouse Wheel Added new event for horizontal mouse wheel. See SWT#MouseHorizontalWheel and SWT#MouseVerticalWheel.

StyledText: variable tab stops New API in StyledText allows the application to specify a non-uniform sequence of tab stops. See Snippet 325.


Milestone M3

StyledText: per line variable tab stops Improved current support to allow each line to have its own sequence of tab stops.

Icon support

CLabel set/get margins New API has been added to CLabel to set and get the left, top, right and bottom margin spacing.

Key location A new field has been added to key event to allow the application to identify which key originated the event. See Event.keyLocation.

New API in Scrollbar New methods have been added to Scrollbar to return the bounds for the thumb and its track. See ScrollBar.getThumbBounds() and ScrollBar.getThumbTrackBounds().

State mask for Selection events The stateMask is now set in Selection and DefaultSelection events for all native controls.

Orientation event A new event has been added to Text, Combo, and StyledText. It is sent when the writing direction is changed via keyboard shortcut. See SWT.OrientationChanged

Browser.setUrl() can specify post data and headers New Browser API setUrl(String url, String postData, String[] headers) allows clients to include post data and add/override header values when initiating HTTP requests. See Snippet 330.

Milestone M4

SWT for PowerPC 64 PowerPC 64 has joined the lineup of supported configurations for which SWT and Eclipse are routinely built.

Wrap indent in StyledText StyledText and TextLayout now offer API to allow the application to control the amount of indent space for wrapped lines. See Snippet 331.

Wrap Indent

Improved bidi segments support The bidi segments support in StyledText and TextLayout was changed to allow the application to specify which Unicode Control Characters to use in the segments boundaries. See Snippet 332.

Improved Bidi Segments support

Right-to-Left text support on Cocoa On Cocoa, setting the SWT.RIGHT_TO_LEFT flag changes the default text reading direction to right to left.

Right-to-Left text support on Cocoa

Skin engine support New API added to allow CSS engines to skin widgets at the appropriate time (See SWT.Skin and Widget#reskin(int)). For more info see Snippet 333.

New layout API New API added to Composite to support automatic deferred layout. See Composite#layout(Control[], int).

Browser.setText() can restrict content permissions New Browser API setText(String html, boolean trusted) allows clients to restrict the permissions that are given to Browser content that is set from a String. Restricting permissions is suggested when the source of the content is not trusted.

Milestone M5

Accessibility upgrade (preview)

SWT Accessibility has new API for making applications more accessible to Assistive Technology products such as screen readers. Note that this API is still early access. Snippet 334 shows a simple custom text control with enhanced text accessibility.

SWT.OpenDoc Event

A new event type has been added to SWT to notify applications that a document should be opened. Listeners for OpenDoc events can be added to a  Display.

Support has also been added to the Equinox launcher, and the Eclipse workbench. Users are now able to associate file types to Eclipse and have Eclipse launched when they open a file of an associated type.

Program working directory

New API has been added to Program to allow the working directory to be specified when launching an executable. See Program.launch(String fileName, String workingDir) for more details.

XULRunner 1.9.2 support

The Browser now has full support for the recent release of XULRunner 1.9.2.

Milestone M6

TaskItem Overlay Image

The new API TaskItem#setOverlayImage(Image) allows clients to set an image to be displayed on top of application button in the taskbar. See Snippet 336 for an example.

Overlay Image

TaskItem Overlay Text

The new API TaskItem#setOverlayText(String) allows clients to set a short text to be displayed on top of application button in the taskbar. See Snippet 336 for an example.

Overlay Text

TaskItem Progress

The new APIs TaskItem#setProgress(int) and TaskItem#setProgressState(int) allows clients to show progress indication in the application button in the taskbar. See Snippet 336 for an example.


TaskItem Menu

The new API TaskItem#setMenu(Menu) allows clients to specify a menu for the application button in the taskbar.

Running on Windows 7:

Menu on Windows

Running on Mac OS X:

Menu on Mac

CTabFolder Renderer

CTabFolder has been improved and now allows clients to change its look by implementing their own renderers.

New CTabFolder

Gradients on CTabFolder unselected tabs

New API has been added to CTabFolder to allow a gradient background on unselected tabs. See Snippet 339 for more info.

Gradient on CTabFolder


The enhanced Accessibility API on all platforms has been finalized and released.

Custom Traversals

New API Control.traverse(int, event) enables clients to request that a customized traversal be performed. For an example of this see Snippet 338.

DrawBackground at an offset

New API was added in Composite.drawBackground that allows for drawing of a parent background at an offset specified by the child. This is useful for aligning patterns between the parent and child when dealing with non-rectangular shapes.

Milestone M7

Browser can use WebKitGTK+

Linux users can now use WebKitGTK+ instead of Mozilla as the Browser control's native renderer. See Can the Browser use the WebKit renderer on GTK?.

WebKitGTK+ Image