SWT: The Standard Widget Toolkit, Volume 1

2.67 avg rating
( 6 ratings by Goodreads )
9780321256638: SWT: The Standard Widget Toolkit, Volume 1

The Standard Widget Toolkit (SWT) is a new class library for creating graphical user interfaces (GUIs) in Java. Created as part of the Eclipse project, SWT allows developers to build efficient, portable applications that directly access the user-interface facilities of the operating systems it is implemented on. This revolutionary technology makes it possible to create Java-based applications that are indistinguishable from a platform's native applications.

SWT: The Standard Widget Toolkit, Volume 1, will show you how to:

  • Get SWT, install it, and invoke it from your programs.
  • Understand widgets--the building blocks of GUI--and how they interact with users and compose a GUI.
  • Use graphics routines to configure the appearance of native widgets and draw application-specific graphics.
  • Apply best practices from real-world uses of SWT.
  • Appreciate what makes a quality SWT program.

In this book--the first definitive guide to SWT--two of the technology's lead designers and implementers show you how to break the task of building a GUI-based application into components. They then show how these components are modeled in SWT and provide a series of graded examples. The result is a guided tour of the essential aspects of this exciting toolkit, ranging from mouse and keyboard handling to user-interface controls for native operating systems.

If you want to build modern GUI-based application, SWT: The Standard Widget Toolkit, Volume 1, will prove an invaluable guide and reference.

"synopsis" may belong to another edition of this title.

About the Author:

The principal architect of the Standard Widget Toolkit (SWT), Steve Northover joined IBM OTI Labs in 1990. He is an expert on performance, programming for operating systems, and native user interface toolkits. He is the lead of the Eclipse SWT team and is one of the few people who understands the implementation of the toolkit on every platform.

Mike Wilson has been a part of IBM OTI Labs since its inception in 1987 as Object Technology International, Inc. Over the years he has played a major part in many of the company's most significant successes, including contributing to the design, implementation, and maintenance of SWT. Currently, he is active in many aspects of the Eclipse Platform, including the Core and Team teams.

Excerpt. Reprinted by permission. All rights reserved.:

When we began this book, our Grand Vision was to create a complete reference for every aspect of SWT. It was not until we began identifying the range of topics that we would need to cover that we realized that SWT is big--not big in size but big in terms of features, uses, and the energy that is behind it. The community that has built up around SWT has pushed it in many directions, everything from PDAs, to stand-alone desktop applications on several platforms, to Eclipse and the many commercial IDEs that have been built from it. We had to narrow the focus.

We decided to cover only those aspects of SWT that every developer would need to know.

  • How to get and install SWT and how to invoke it from your programs.
  • The fundamental systems that make up SWT: mouse and keyboard handling, graphical user interface components, drawing routines, etc.
  • The native operating system-based user interface controls.

These topics, covered in depth and with many examples, are exactly what you will find on the following pages.

To give you some idea of the scope of the original problem, here are some of the topics that we are not going to cover in detail.

  • Frameworks built from SWT (e.g., JFace and GEF)
  • Coding patterns specific to using SWT in Eclipse
  • The custom widgets package created for Eclipse
  • Drag-and-drop and clipboard support
  • Platform-specific features, such as OLE support on Windows
  • Building your own new widgets, dialogs, and layouts
  • Bidirectional language (BIDI) support
  • Implementation strategies used by SWT
  • The HTML browser widget
  • Printing
  • OpenGL support

We touch on these topics when they come up in context and attempt to provide pointers to more information, but as one of our reviewers said, "It cries out for a Volume 2." We are aware of this. Once we get this one out the door and have enough time to remember who our families are again, we will start thinking about it.

Another very interesting element of this book is the inclusion of some of the history behind SWT and the design decisions that led to it having the shape that it does. We felt that, as two of the original designers, we could provide a better insight into this than you are likely to find elsewhere. Although this content represents only a small portion of the total, we hope that you find it interesting.

Contributing to SWT

As you learn more about SWT, it is worth keeping in mind that SWT is not a closed system. If you are new to the open source community, you may be used to thinking in terms of code libraries coming from "somewhere else," in which you have little say in the design, direction, or development. SWT, and indeed the entire Eclipse project, follows a different path.

SWT is supported by a community of developers. Anyone who wants to contribute time and energy can become part of that community. The first step is to keep in mind that whenever you find what you think is a bug in SWT, you should enter a Bugzilla report that describes the problem at https://bugs.eclipse.org/bugs/. SWT developers like bug reports and use them to communicate and organize their work.

If the bug that you have found (or any other bug, for that matter) is causing you grief, ask a question on the SWT newsgroup and start a discussion about it. Given that the entire source for SWT is available, you can also try to fix the problem by doing the following.

  1. Figuring out what is wrong.
  2. Changing your copy of the SWT code to make it stop happening.
  3. Attaching a patch that shows the changes to the Bugzilla report.

If you get stuck, ask the other developers whether they have suggestions. The best place to have this discussion is on the developer's mailing list, which you can find by following the links from http://www.eclipse.org/mail/index.php.

The SWT developers look at every patch that is submitted. Because they have a wide understanding of the implications of a given change, you may be asked to submit a new patch that takes into account aspects of the problem that you missed. Keep trying. When you get to the point where the other developers trust that code you submit can be added and it is clear that you are going to continue to contribute, a vote will be taken to give you the right to change the SWT source that everyone uses. This is called earning your commit rights. If any of this appeals to you, go for it. We would love to have your help!

"About this title" may belong to another edition of this title.

Top Search Results from the AbeBooks Marketplace


Northover, Steve, Wilson, Mike
Published by Addison-Wesley Professional (2004)
ISBN 10: 0321256638 ISBN 13: 9780321256638
New Paperback Quantity Available: 2
Murray Media
(North Miami Beach, FL, U.S.A.)

Book Description Addison-Wesley Professional, 2004. Paperback. Book Condition: New. Never used!. Bookseller Inventory # P110321256638

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 64.27
Convert Currency

Add to Basket

Shipping: US$ 1.99
Within U.S.A.
Destination, Rates & Speeds


Steve Northover, Mike Wilson
Published by Addison-Wesley Professional (2004)
ISBN 10: 0321256638 ISBN 13: 9780321256638
New Paperback Quantity Available: 1

Book Description Addison-Wesley Professional, 2004. Paperback. Book Condition: New. 1. Bookseller Inventory # DADAX0321256638

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 97.15
Convert Currency

Add to Basket

Shipping: US$ 3.99
Within U.S.A.
Destination, Rates & Speeds