Is SWT Ready for the Years to Come?

June 17, 2013 | 2 min Read

With all of the current mobile and desktop operating systems we use all day, most users expect a great deal from an application user interface.

People take things like animated transitions, gesture-based navigation, transparent controls and high resolution graphics, for granted.

Yes, SWT recently added Touch- and Gesture Listeners. And yes, you can set alpha on a shell. And yes, you can use a FormLayout to have overlapping UI elements. But it still feels like SWT is lagging way behind modern Widget Toolkits.

With Tabris and the Tabris UI we introduced additional APIs and abstraction to provide you with the modern functionality that SWT is missing.

But still, I would love to see - rather sooner than later - image support for different resolutions. Something like an ImageRegistry where you register your default 16x16 image and a couple of alternative images in other resolutions (24x24, 32x32) for higher resolution displays. Then you would just reference the default image in your code. However, at runtime SWT could determine the appropriate image to display instead.

So, what are your experiences? Any other things you are missing in SWT?

Please leave you comments below.

Here a practical takeaway

If you are a MacBook Pro user with one of those high resolution Retina displays, you might have noticed that Eclipse is not a joy to look at.

Default and Retina closeup

Enabling Retina (HiDPI) on the Mac

With the following command, you can enable high resolution rendering of native UI components such as widgets and text on a system-wide level:

defaults write -g AppleMagnifiedMode NO

I’ve tested this for the past six months without any problems.

Most of the UI looks smooth, but things drawn by GC are displayed with double-sized pixels to maintain the right sizes on the screen and therefore look pixelated.