Chapter 18. A Complete SWT Application

To complete the process of learning how to use the SWT, the final step is to complete a fully functioning application. Until now, the examples have been designed to showcase a single technique associated with a single widget. In this chapter, a Text Editor application will be developed and analyzed, as a demonstration of how to pull various techniques into a functional application.

Designing the Application

The first step of any development process is to design the application. For a complex application, the design phase can take at least as long as development time, and might consist of the development of screen layouts or even functional prototypes.

For the purposes of this exercise, making a simple list of the functionality required for the application will suffice. The list should be as comprehensive as possible to serve as a complete guide to exactly what functionality will be included in the application.

The SWT Text Editor will have the following functionality:

  • The ability to edit text

  • The ability to open files, with the contents being displayed in the text-editing area of the application

  • The ability to save the contents of the text-editing area into a file for later use

  • The ability to copy selected text from the text-editing area into the clipboard

  • The ability to cut text from the text-editing area into the clipboard

  • The ability to paste text from the clipboard into the text-editing area

  • The ability to display an About dialog with information ...

Get SWT: A Developer's Notebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.