Book description
The Eclipse platform continues to gain tremendous popularity as both a Java IDE and a Java platform for application programming. One of the core underpinnings of Eclipse is SWT, the Standard Widget Toolkit. This set of components can be used to develop graphical user interfaces in Java,and offer a native-code alternative to Java's Swing and AWT components. Incorporating the look and feel of whatever platform the code is run on, SWT offers a lightning-fast approach to building GUIs, all of which actually look like they belong on the platform on which they are run. But you already know what you want to do--so wading through the basics of user interface design, graphical components, and what a button does is simply a waste of time. Enter SWT: A Developer's Notebook. In typical Developer's Notebook style, you'll learn how to take SWT out for a spin, make it work for you, and turn it upside down, all without wasted words or space. Each lab in this notebook details a specific task; you can read from the first page to the last, look up just what you need to know, and even squeeze this book into your laptop bag as a quick reference when you forget how to create a multi-tabbed view. This book covers:
Downloading and configuring Eclipse and SWT
Menus, toolbars, and buttons
Building tabbed layouts and folders
SWT's unique coolbar control
Adding listeners and responding to events
Building a complete SWT-based application
Table of contents
-
SWT: A Developer’s Notebook
- The Developer’s Notebook Series
- Preface
- 1. Getting Started
- 2. SWT Shells
-
3. SWT Menus
- Creating the Menu Bar
- Adding Drop-Down Menus
- Adding Separator Bars
- Creating a Complete Menu System
- Adding Cascading Submenus
- Making Menus Perform the Intended Action
- Working with Other Menu Item Styles
- Determining the State of CHECK and RADIO Menu Items
- Adding Keyboard Shortcuts
- Creating Pop-Up Menus
- 4. SWT Toolbars
-
5. SWT Text Fields
- Adding Text Fields to a Shell
- Adding a Border to a Text Field
- Positioning the Text Field
- Setting the Tab Order
- Setting the Text Size Limit
- Interacting with the Text in the Text Widget
- Populating Text Fields from a Database
- Appending Text to a Text Field’s Contents
- Creating Multiline Text Fields
- Wrapping Text
- Adding Scrollbars
- Reacting to Text Events
- Performing Field Validation
- Creating Display-Only Text Fields
- Creating Password Fields
-
6. SWT Buttons
- Creating Push-Style Buttons
- Responding to Button Clicks
- Creating Check Buttons
- Determining CHECK Button Status
- Adding Listeners to CHECK Buttons
- Using Radio-Style Buttons
- Causing No Radio Button to be Selected
- Creating Toggle Buttons
- Determining the State of a Toggle Button
- Creating Arrow Buttons
- Using Images with Buttons
- Setting Tool-Tip Text
- Enabling and Disabling Buttons
-
7. SWT Lists
- Creating a List
- Adding Items to a List
- Inserting Items in the Middle of a List
- Populating a List from a Database
- Removing Items from a List
- Determining the Selected Items
- Determining the Selected Item with Multiple Selections
- Causing an Item to Appear Selected
- Changing an Item’s Text Value
- Adding Scrollbars to a List
-
8. The SWT Combo
- Creating a Combo List
- Adding Items to a Combo List
- Creating a Working Combo List
- Getting the Value of the Selected Item
- Programmatically Selecting an Item
- Removing Items from a Combo List
- Adding Events to Combo Widgets
- Allowing Additions to the Combo List
- Getting and Setting Text in the Text Portion of the Combo
- Setting the Maximum Length for Entries
- Deselecting Text
- Responding to Item Changes in the Combo
- Using the SIMPLE Style
-
9. SWT Layouts
- What Are the SWT Layouts?
- Attaching a Layout to a Container
- Filling the Entire Container with Widgets
- Changing Widget Placement in FillLayouts
- Lining Up Widgets Using RowLayout
- Controlling Wrapping of Widgets with RowLayout
- Controlling Sizing of Widgets with RowLayout
- Creating Vertical Rows
- Creating a GridLayout
- Creating Column Headings
- Controlling Widget Sizing and Alignment
- Forcing Widgets to Span Multiple Cells
- The SWT FormLayout
- Creating a Simple Password Entry Form
- 10. SWT Composites and Groups
- 11. SWT Tabbed Folders
- 12. SWT Tables
- 13. SWT Trees
- 14. Other SWT Listeners
- 15. SWT CoolBars
- 16. SWT Slider and ProgressBar
- 17. SWT Standard Dialogs
- 18. A Complete SWT Application
- Index
- Colophon
Product information
- Title: SWT: A Developer's Notebook
- Author(s):
- Release date: October 2004
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596008383
You might also like
book
Eclipse: Building Commercial-Quality Plug-ins, Second Edition
A new edition of this title is available, ISBN-10: 0321553462 ISBN-13: 9780321553461 "I'm often asked, 'What …
book
Official Eclipse 3.0 FAQs
"I had a question about how to use a new Eclipse 3.0 feature, job scheduling, so …
book
Eclipse TEA Revealed: Building Plug-ins and Creating Extensions for Eclipse
Discover the open source Eclipse Tasking Engine Advanced (TEA) project in this compact to-the-point book. It …
book
OSGi and Equinox
A Hands-On Guide to Equinox and the OSGi Framework In , three leading experts show developers—for …