Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

About the Authors

About the Title

About the Cover Illustration

Chapter 1. Overview of SWT and JFace

1.1. What is SWT/JFace?

1.1.1. Building GUIs with SWT

1.1.2. Simplifying GUI development with JFace

1.2. Looking under the hood

1.2.1. The old standby: Swing

1.2.2. The newcomer: SWT/JFace

1.2.3. The SWT/Swing debate

1.3. SWT/JFace: licensing and platform support

1.3.1. The Common Public License

1.3.2. Platforms supported

1.4. The WidgetWindow

1.5. Summary

Chapter 2. Getting started with SWT and JFace

2.1. Programming in SWT

2.1.1. The HelloSWT program

2.1.2. The Display class

2.1.3. The Shell class

2.2. Programming in SWT/JFace

2.2.1. Model-based adapters

2.2.2. The HelloSWT_JFace program

2.2.3. Coding in JFace and SWT/JFace

2.2.4. The ApplicationWindow class

2.3. Beginning the WidgetWindow application

2.4. Summary

Chapter 3. Widgets: part 1

3.1. Introducing the Widget and Control classes

3.1.1. Understanding the Widget class

3.1.2. Working with Control objects

3.2. Labels

3.2.1. Styles and separators

3.2.2. Label methods

3.3. Involving the user with buttons

3.3.1. Causing action with push buttons and SWT.PUSH

3.3.2. Moving on with arrow buttons and SWT.ARROW

3.3.3. Changing state with toggle buttons and SWT.TOGGLE

3.3.4. Choosing with check buttons and SWT.CHECK

3.3.5. Making a single choice with radio buttons and SWT.RADIO

3.4. Containing components with Composites

3.4.1. Understanding the Composite class

3.4.2. Groups

3.4.3. SashForms

3.4.4. TabFolders

3.5. Updating WidgetWindow

3.5.1. Creating the Ch3_Composite class

3.5.2. Creating the WidgetWindow TabFolder

3.6. Summary

Chapter 4. Working with events

4.1. Event processing in SWT

4.1.1. Using typed listeners and events

4.1.2. Adapters

4.1.3. Keyboard events

4.1.4. Customizing event processing with untyped events

4.1.5. An SWT listener/event application

4.2. Event processing in JFace

4.2.1. Understanding actions and contributions

4.2.2. Creating Action classes

4.2.3. Implementing contributions in an ApplicationWindow

4.2.4. Interfacing with contributions

4.2.5. Exploring the Action class

4.3. Updating the WidgetWindow

4.3.1. Building the chapter 4 Composite

4.3.2. Adding Ch4_Composite to the WidgetWindow

4.4. Summary

Chapter 5. More widgets

5.1. Editing text with SWT

5.1.1. The basic Text widget

5.1.2. The StyledText widget

5.2. JFace text support

5.2.1. Obtaining the JFace text packages

5.2.2. TextViewer and Document

5.2.3. A JFace example

5.3. The Combo widget

5.4. ToolBarManager

5.4.1. ControlContribution

5.4.2. Creating toolbars by hand

5.5. CoolBar

5.6. Slider

5.7. ProgressBar

5.8. ProgressIndicator

5.9. Summary

Chapter 6. Layouts

6.1. The fill layout

6.2. The row layout

6.2.1. Customizing individual layout cells

6.3. The grid layout

6.3.1. GridData

6.4. The form layout

6.4.1. Using FormData

6.4.2. Specifying relations using FormAttachment

6.4.3. Laying out controls using a form layout

6.5. Custom layouts

6.5.1. Calculating the layout’s size

6.5.2. Laying out the widgets

6.5.3. Updating WidgetWindow

6.6. Summary

Chapter 7. Graphics

7.1. The graphic context

7.1.1. Creating a GC object

7.1.2. Drawing shapes on a Canvas

7.1.3. Painting and PaintEvents

7.1.4. Clipping and Canvas styles

7.2. Programming with colors

7.2.1. Color development with SWT

7.2.2. Additional color capability with JFace

7.3. Displaying text with fonts

7.3.1. Using fonts with SWT

7.3.2. Coding with fonts

7.3.3. Improved font management with JFace

7.4. Incorporating images in graphics

7.4.1. Allocating images

7.4.2. Coding graphics with images

7.4.3. Creating a bitmap with ImageData

7.4.4. Manipulating images with ImageData

7.4.5. Managing images with JFace

7.5. Updating the WidgetWindow

7.5.1. Building the chapter 7 composite

7.5.2. Adding Ch7_Composite to the WidgetWindow

7.6. Summary

Chapter 8. Working with trees and lists

8.1. Viewers and the Viewer framework

8.1.1. Providers

8.1.2. Listeners

8.1.3. Filters and sorters

8.2. Trees

8.2.1. SWT trees

8.2.2. JFace TreeViewers

8.3. Using the List widget

8.3.1. SWT lists

8.3.2. JFace ListViewers

8.4. Updating WidgetWindow

8.5. Summary

Chapter 9. Tables and menus

9.1. Tables

9.1.1. Understanding SWT tables

9.1.2. JFace TableViewers

9.2. Creating menus

9.2.1. Accelerator keys

9.2.2. Creating menus in SWT

9.2.3. Using JFace actions to add to menus

9.3. Updating WidgetWindow

9.4. Summary

Chapter 10. Dialogs

10.1. SWT dialogs

10.1.1. ColorDialog

10.1.2. DirectoryDialog

10.1.3. FileDialog

10.1.4. FontDialog

10.1.5. MessageBox

10.2. JFace dialogs

10.2.1. Message dialogs

10.2.2. Error dialogs

10.2.3. Input dialogs

10.2.4. Progress monitor dialogs

10.2.5. Custom dialogs

10.3. Updating WidgetWindow

10.4. Summary

Chapter 11. Wizards

11.1. Multipage dialogs

11.1.1. IDialogPage

11.1.2. IWizardPage

11.1.3. WizardPage

11.2. The wizard

11.2.1. IWizard

11.2.2. Wizard

11.3. Putting it all together

11.3.1. Wizard containers

11.3.2. WizardDialog

11.4. Combining wizards

11.4.1. WizardSelectionPage

11.4.2. IWizardNode

11.5. Persistent wizard data

11.5.1. DialogSettings

11.6. Updating WidgetWindow

11.7. Summary

Chapter 12. Advanced features

12.1. Transferring data

12.1.1. The Transfer class

12.1.2. Drag-and-drop capability

12.1.3. Using the clipboard

12.1.4. The filesystem browser

12.2. Preferences

12.2.1. Preference pages

12.2.2. Field editors

12.2.3. Preference page containers

12.2.4. Persistent preferences

12.3. Label decorators

12.3.1. ILabelDecorator

12.3.2. DecoratingLabelProvider

12.3.3. An example

12.4. The Browser widget

12.5. Summary

Chapter 13. Looking beyond SWT/JFace: the Rich Client Platform

13.1. Understanding RCP workbenches

13.1.1. Entering data with editors

13.1.2. Displaying information with views

13.1.3. Combining editors and views with perspectives

13.2. RCP: Looking under the hood

13.2.1. Creating and configuring an RCP project

13.2.2. Building the application class

13.2.3. Adding a WorkbenchAdvisor

13.3. Adding views and perspectives

13.3.1. Building views

13.3.2. Arranging workbench windows with a perspective

13.3.3. Executing an RCP application

13.3.4. Reviewing the RCP process

13.4. Populating forms with Eclipse Forms widgets

13.4.1. Using FormToolkit and the Eclipse Forms containers

13.4.2. Firing text-based events with Hyperlinks

13.5. Building a standalone RCP application

13.5.1. Exporting RCPExample to an application directory

13.5.2. Adding plug-ins to the application directory

13.5.3. Executing the application

13.6. Summary

Appendix A. Creating projects with SWT/JFace

A.1. Eclipse-based SWT/JFace development

A.1.1. SWT and JFace projects in Windows

A.1.2. SWT and JFace projects in *nix

A.1.3. SWT in OS X

A.2. SWT/JFace in standalone applications

Appendix B. OLE and ActiveX in SWT/JFace

B.1. COM simplified

B.1.1. IUnknown/IDispatch

B.1.2. Object hosting

B.1.3. Object instantiation

B.1.4. Event handling

B.1.5. Threading model

B.2. The SWT COM library

B.2.1. The native language support library

B.2.2. The Java COM library

B.3. Doing COM with SWT

B.3.1. A simple example

B.3.2. SWT COM programming patterns

B.3.3. Advanced topics

B.3.4. A final example

Appendix C. Changeable GUIs with Draw2D

C.1. Understanding Draw2D

C.1.1. Using Draw2D’s primary classes

C.1.2. The Flowchart application

C.2. Draw2D Figures

C.2.1. Figure methods

C.2.2. Using Labels and Clickables

C.3. Using LayoutManagers and panes

C.3.1. Understanding LayoutManager subclasses

C.3.2. LayeredPanes

C.3.3. ScrollPanes and Viewports

C.4. Using the Graphics class to create Shapes

C.4.1. Using the Graphics class

C.4.2. Draw2D geometry and graphs

C.5. Understanding Connections

C.5.1. Working with ConnectionAnchors

C.5.2. Adding Connections to the GUI

C.6. Putting it all together

C.6.1. Drag-and-drop in Draw2D

C.6.2. Creating Figures with a FigureFactory

C.6.3. The Flowchart class

Appendix D. The Graphical Editing Framework (GEF)

D.1. A GEF overview

D.1.1. Separation of concerns theory

D.1.2. Separation of concerns: GEF implementation

D.1.3. MVC interaction

D.1.4. Building the flowchart editor

D.2. Creating the FlowchartProject

D.2.1. Configuring the Plugin.xml file

D.2.2. Adding class libraries

D.2.3. Adding packages and classes

D.3. Creating the editor’s PaletteViewer

D.3.1. Handling events with the ToolEntry and Tool classes

D.3.2. Creating components with templates

D.4. The Model aspect: Model classes

D.4.1. Model classes and JavaBeans

D.4.2. The AbstractChartElement class

D.4.3. The Chart class

D.4.4. The Activity class

D.4.5. The Path class

D.5. Changing Model properties with Commands

D.5.1. Commands and CommandStacks

D.5.2. The CreateCommand class

D.5.3. The PathCommand class

D.5.4. The DeleteCommand class

D.5.5. The SetConstraintCommand class

D.6. The Controller aspect: EditPart classes

D.6.1. Creating new EditParts with EditPartFactory objects

D.6.2. The ChartPart class

D.6.3. The ActivityPart class

D.6.4. The PathPart class

D.7. Creating Commands with EditPolicy objects

D.7.1. The getCommand() method

D.7.2. GEF policies in the flowchart editor

D.8. Adding Actions to the editor

D.8.1. The ActionRegistry and ContextMenus

D.8.2. Redirecting Workbench actions with RetargetAction

D.9. Editing with GEF: two examples

D.9.1. Example 1: deleting a component with a keystroke

D.9.2. Example 2: how connections are created

D.10. Introducing the EditorPart

D.10.1. Working with EditorParts and GraphicalEditors

D.10.2. Understanding the GraphicalViewer

D.10.3. The FlowchartEditor

D.11. Other GEF aspects

D.11.1. Accessibility

D.11.2. Grid layout

D.11.3. Zooming in and out

D.11.4. Kudos to Randy Hudson

Index

List of Figures

List of Tables

List of Listings

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201