This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.

The open-source NetBeans Platform is an extraordinarily powerful framework for building "write once, run anywhere" rich client applications. Now, for the first time since the release of NetBeans IDE 5.0, there's a comprehensive guide to rich client development on the NetBeans Platform.

Written for Java developers and architects who have discovered that basic Swing components are not enough for them, this book will help you get started with NetBeans module development, master NetBeans' key APIs, and learn proven techniques for building reliable desktop software. Each chapter is filled with practical, step-by-step instructions for creating complete rich client applications on top of the NetBeans Platform and plugins for NetBeans IDE.

Rich Client Programming 's wide-ranging content covers

  • Why modular development makes sense for small, medium, and large applications
  • Using NetBeans to accelerate development and improve efficiency
  • Leveraging NetBeans productivity features, from the Component Palette to Code Completion
  • Leveraging NetBeans' modular architecture in your own applications
  • Implementing loosely coupled communication to improve code maintainability and robustness
  • Managing user- and system-configuration data
  • Building reloadable components with solid threading models
  • Constructing sophisticated multiwindow applications and presenting rich data structures to users
  • Adding user-configurable options
  • Integrating Web services with NetBeans desktop applications
  • Automating module updates and providing user help
Foreword by Jonathan Schwartz Foreword by Jan Chalupa Preface About the Authors and Contributors Acknowledgments Chapter 1: Getting Started with the NetBeans Platform Chapter 2: The Benefits of Modular Programming Chapter 3: Modular Architecture Chapter 4: Loosely Coupled Communication Chapter 5: Lookup Chapter 6: Filesystems Chapter 7: Threading, Listener Patterns, and MIME Lookup Chapter 8: The Window System Chapter 9: Nodes, Explorer Views, Actions, and Presenters Chapter 10: DataObjects and DataLoaders Chapter 11: Graphical User Interfaces Chapter 12: Multiview Editors Chapter 13: Syntax Highlighting Chapter 14: Code Completion Chapter 15: Component Palettes Chapter 16: Hyperlinks Chapter 17: Annotations Chapter 18: Options Windows Chapter 19: Web Frameworks Chapter 20: Web Services Chapter 21: JavaHelp Documentation Chapter 22 Update Centers Chapter 23: Use Case 1: NetBeans Module Development Chapter 24: Use Case 2: Rich Unger on Application Development Chapter A: Advanced Module System Techniques Chapter B: Common Idioms and Code Patterns in NetBeans Chapter C: Performance Index



Autorentext

Tim Boudreau coauthored NetBeans(TM): The Definitive Guide (O'Reilly), served on the team that open-sourced NetBeans, and continues to develop for the NetBeans project.

Jaroslav Tulach cofounded the NetBeans project, and remains a leading guardian of the project API.

Geertjan Wielenga is the technical writer responsible for NetBeans documentation relating to module development and rich-client application development.



Inhalt

Foreword by Jonathan Schwartz xv Foreword by Jan Chalupa xvii Preface xix About the Authors and Contributors xxvii Acknowledgments xxxi

Chapter 1: Getting Started with the NetBeans Platform 1

1.1 Setting Up the IDE 1 1.2 NetBeans IDE Basics 3

Chapter 2: The Benefits of Modular Programming 11

2.1 Distributed Development 11 2.2 Modular Applications 13 2.3 A Modular Programming Manifesto 15 2.4 Using NetBeans to Do Modular Programming 19

Chapter 3: Modular Architecture 23

3.1 Modules-The Assembly Units of a Modular Application 23 3.2 Types of Modules 24 3.3 Module Lifecycle 29 3.4 Groups of Modules 33

Chapter 4: Loosely Coupled Communication 39

4.1 Registration and Discovery 39 4.2 MetaInf Services 41 4.3 The Global Lookup 43 4.4 Writing an Extension Point 46

Chapter 5: Lookup 49

5.1 Objects That Own Lookups 53 5.2 Lookup as a Communication Mechanism 55 5.3 Lookups and Proxying 58 5.4 Lookup and Selection 62 5.5 Writing Lookup-Sensitive Actions 63 5.6 Tracking the Global Selection 64 5.7 Legacy Variants of the Lookup Pattern in NetBeans APIs 65 5.8 Common Lookup Patterns 66

Chapter 6: Filesystems 69

6.1 FileSystems and FileObjects 70 6.2 What Kinds of FileSystems Will I Be Dealing With? 71 6.3 Layering 72 6.4 XML Filesystems 73 6.5 Declarative Registration II: The System Filesystem 74 6.6 Getting from FileObjects to Java Objects 88 6.7 Browsing the System Filesystem 96 6.8 Conclusions 96

Chapter 7: Threading, Listener Patterns, and MIME Lookup 103

7.1 Creating the Modules and SPI 104 7.2 Implementing ListModelProvider 107 7.3 Providing a UI Component 123 7.4 Using the Pseudo Navigator 132 7.5 Conclusion: PseudoNavigator-What's Wrong with This Picture? 132

Chapter 8: The Window System 135

8.1 What the Window System Does 137 8.2 Classes in the Window System API 139 8.3 Using TopComponent 141 8.4 Persisting State across Sessions 145 8.5 Window System Persistence Data 147 8.6 Creating Editor-Style (Nondeclarative) TopComponents 152 8.7 Advanced Window System Configuration: Defining Your Own Modes 153 8.8 Using TopComponent Groups 158

Chapter 9: Nodes, Explorer Views, Actions, and Presenters 163

9.1 The Nodes API 164 9.2 The Explorer API 177 9.3 Actions 190 9.4 Node Properties 199 9.5 Nodes and DataObjects: Creating a System Filesystem Browser 203 9.6 Epilogue: Of Nodes, Property Sheets, and User Interface Design 205

Chapter 10: DataObjects and DataLoaders 207

10.1 DataObjects: Where Do They Come From? 210 10.2 Adding Support for a New File Type 212 10.3 Using Custom File Types Internally 234 10.4 Serialized Objects and the System Filesystem 235

Chapter 11: Graphical User Interfaces 237

11.1 Introduction 237 11.2 Creating a New GUI Form 240 11.3 Placing and Aligning a Component in a Form 240 11.4 Setting Component Size and Resizability 242 11.5 Specifying Component Behavior and Appearance 244 11.6 Generating Event Listening and Handling Methods 244 11.7 Customizing Generated Code 247 11.8 Building an Explorer View Visually 249 11.9 Previewing a Form 250 11.10 Using Custom Beans in the Form Editor 250 11.11 Using Different Layout Managers 251

Chapter 12: Multiview Editors 253

12.1 Introduction 253 12.2 Getting Started 255 12.3 Understanding Multiview Editors 256 12.4 Creating the Editor's Infrastructure 257 12.5 Creating the Source View 261 12.6 Creating the Visual View 269 12.7 Finishing the Sample 271

Chapter 13: Syntax Highlighting 273

13.1 Introduction 273 13.2 Preparing to Create Syntax Highlighting 274 13.3 Creating Token IDs 275 13.4 Creating a Lexical Analyzer 277 13.5 Extending the Options Window 281 13.6 Registering the Syntax Highlighting in the Layer File 284 13.7 Finishing Up 286

Chapter 14: Code Completion 287

14.1 Introduction 287 14.2 Understanding Code Completion 289 14.3 Code Completion Query Types 291 14.4 Preparing to Work with the CompletionProvider Interface 291 14.5 Implementing a CompletionProvider 293 14.6 Implementing a CompletionItem 296 14.7 Adding a Filter to the CompletionProvider 300 14.8 Adding Documentation to the Code Completion Box 304 14.9 Adding a Tooltip to the Code Completion Box 305

Chapter 15: Component Palettes 307

15.1 Introduction 307 15.2 Adding Items to a Palette 313 15.3 Dragging and Dropping Palette Items 323 15.4 Adding Supporting Features to …

Titel
Rich Client Programming
Untertitel
Plugging into the NetBeans Platform
EAN
9780132344487
Format
E-Book (pdf)
Hersteller
Veröffentlichung
24.04.2007
Digitaler Kopierschutz
Wasserzeichen
Anzahl Seiten
640