Other GUI technologies

By themselves, or as the foundation of an RCP application, Swing and SWT are not the only available base technologies for GUI development. This section reviews other GUI technologies that are related to Java, both open source and commercial. The list is partial and by no means complete. 13. Available at http www.3plus4.de swt Table 11.5 GUI technologies related to Java Table 11.5 GUI technologies related to Java Exports the graphic display of a Java SWT application running on one host on a...

The Action framework

The higher-level user commands are shown as one of the three main parts of our initial decomposition in Figure 16.6. We used 'shallow actions' in the Library application in Chapter 15 for handling user commands. The Sandbox application instead demonstrates the Command pattern at work, employing what we referred to as 'deep actions' in Chapter 6. We defined deep actions as the proper way to use Swing's Action class to implement the Command design pattern fully. Figure 16.14 restates the Command...

An initial GUI paper mockup

Mockup Java

From an informal meeting among designers, the first design proposal is sketched out. The main window is composed of a toolbar, a list of all the active searches, and a status bar, as shown in Figure 14.6. Each item in the list represents a search, with a title and other useful data, such as the current status of the search, an is available for quick selection. The commands in the toolbar affect the currently-selected search item in the list. By double-clicking on a search item, another window...

UI widgets

This section describes the top-level components of the MIDP UI library. Table 10.1 shows the built-in components provided for developing MIDP applets. 1. See http java.sun.com products midp . Table 10.1 MIDP UI Top-Level Components Table 10.1 MIDP UI Top-Level Components In Table 10.1 the first two top-level containers, the Alert and Form classes, are visual containers of simpler UI widgets called items, which all extend the Item abstract class. The remaining two, List and TextBox, are...

The Spring RCP

The Spring RCP is a framework built on top of Swing to support the construction of medium to large client applications. The Spring RCP is still in its early stages of development5 compared with both NetBeans and Eclipse RCPs. In contrast to the latter two RCPs, the Spring RCP is not the result of refactoring the implementation of an existing IDE, so its features don't include those typical of development-oriented tools, such as version control and advanced text editor support. Perhaps the...

The smart GUI antipattern

The shame of every GUI book is the 'smart GUI antipattern' Evans 2004 . This consists of shoveling all implementation into one class and forgetting about sophisticated layering techniques or fine OO design. Building a GUI this way has a small start-up complexity, but one that tends to grow sharply. Nevertheless, this could be just what we need in some situations. Simple projects with form-based GUIs and with little business behavior are good candidates for this approach. By adopting such an...

OOUI objects

Chapter 1 showed that OOUI objects are domain-related, conceptual objects that are offered to users for manipulation. When it comes to implementing such objects in practice, a single OOUI object is usually realized by several Java classes. First we need to define carefully the OOUI objects needed in the GUI. We have only two OOUI objects in this simple example Books and Libraries. Libraries are collections of Books, with some additional attributes. This situation is represented in the UML class...

Representing user actions with the Command pattern

Handling user commands is a common problem when building GUIs. This book illustrates a number of solutions, most of them based on the Command design pattern. Such a pattern essentially transforms requests commands into objects the request is contained within the object itself. This involves encapsulation of the code associated with the request or, more specifically, the code that actually performs the command. Figure 6.14 shows the Command pattern directly instantiated for the Swing library....

Source code

Source code is provided on my Web site at or you can start from the home page at http www.marinilli.com and follow the links from there. It is organized into separated bundles for each chapter, and a single file containing the code for all the chapters is also available. Sources are provided with Ant build files and with Eclipse projects. Some of the example applications can also be launched on line using JNLP links, available at The JNLP client will ask for authorization prior to installing...