Chapter 12. Advanced features

 

By now, you should be familiar with everything you need to build a working application using SWT and JFace. We’ve covered the essential widgets, shown you how to easily position them on the screen, and discussed the issues to keep in mind to ensure a well-designed piece of software. However, you’ll want to become familiar with a few miscellaneous topics as your use of SWT increases.

This chapter covers a variety of issues. We’ll start by discussing how to transfer data to and from the underlying operating system, and we’ll show how to use this capability to implement drag-and-drop and copy-and-paste functionality in your applications. Next we’ll discuss two frameworks provided by SWT for managing user preferences and enhancing how your labels are displayed by the viewer classes. Finally, we’ll close with a brief look at a new widget provided in SWT 3.0, the Browser, which enables you to control the user’s web browser from within your application.

Because some of these classes are designed around interacting directly with the underlying operating system, there are differences in how they function on different platforms. In addition, some widgets aren’t fully supported on all platforms at the current time. We’ll point out these platform-specific gotchas as we go along.

12.1. Transferring data

12.2. Preferences

12.3. Label decorators

12.4. The Browser widget

12.5. Summary