- 2.1 A Community of Plug-ins
- 2.2 Inside Plug-ins
- 2.3 Putting a System Together
- 2.4 OSGi Framework
- 2.5 Equinox
- 2.6 Standard Widget Toolkit (SWT)
- 2.7 JFace
- 2.8 UI Workbench
- 2.9 Summary
- 2.10 Pointers
2.6 Standard Widget Toolkit (SWT)
Sitting beside the OSGi and Equinox is the SWT. SWT is a low-level graphics library that provides standard UI controls such as lists, menus, fonts, and colors, that is, a library that exposes what the underlying window system has to offer. As the SWT team puts it, "SWT provides efficient, portable access to the UI facilities of the OSs on which it is implemented."
This amounts to SWT being a thin layer on top of existing windowing system facilities. SWT does not dumb down or sugarcoat the underlying window system but rather exposes it through a consistent, portable Java API. SWT is available on a wide variety of window systems and OSs. Applications that use SWT are portable among all supported platforms.
The real trick of SWT is to use native widgets as much as possible. This makes the look and feel of SWT-based applications match that of the host window system. As a result, SWT-based systems are both portable and native.
Notice that SWT does not depend on Equinox or OSGi. It is a stand-alone library that can be used outside of Eclipse or RCP.