Home > Store

Rich Client Programming: Plugging into the NetBeans Platform

Register your product to gain access to bonus material or receive a coupon.

Rich Client Programming: Plugging into the NetBeans Platform

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2007
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-235480-2
  • ISBN-13: 978-0-13-235480-6

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       

Sample Content

Table of Contents

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 a Palette        331
15.5  Creating a Palette for a Text-Based Editor        344

Chapter 16: Hyperlinks        355

16.1  Introduction        355
16.2  Preparing to Work with the HyperlinkProvider Class        357
16.3  Hyperlinks in Manifest Files        359

Chapter 17: Annotations        367

17.1  Introduction        367
17.2  Preparing to Create an Error Annotation        368
17.3  Creating an Error Annotation        368
17.4  Preparing to Use an Error Annotation        376
17.5  Using an Error Annotation        377
17.6  Finishing Up        383

Chapter 18: Options Windows        385

18.1  Introduction        385
18.2  Looking at the Options Window Extension Files        389
18.3  Creating a Primary Panel        393
18.4  Adding Settings to the Options Window        396

Chapter 19: Web Frameworks        399

19.1  Introduction        399
19.2  Preparing to Work with the WebFrameworkProvider Class        404
19.3  Providing a Framework Configuration Panel        406
19.4  Creating a Source Structure        413
19.5  Letting the User Select a Library in the Frameworks Panel        423
19.6  Project Properties Dialog Box and Web Frameworks        424
19.7  Finishing Up        427

Chapter 20: Web Services        429

20.1  Introduction        429
20.2  Creating and Testing a Web Service Client        430
20.3  Integrating the Web Service Client        435

Chapter 21: JavaHelp Documentation        441

21.1  Creating a Help Set        442
21.2  Removing the IDE's Help Sets        446
21.3  Branding the Help Set's Default Texts        449

Chapter 22  Update Centers        453

22.1  Introduction        453
22.2  Adding the IDE's Update Center Functionality        454
22.3  Creating and Distributing an Autoupdate Descriptor        456
22.4  Distributing the URL to the Autoupdate Descriptor        458
22.5  Downloading NBM Files from an Update Center        461
22.6  Publishing Updates to Existing Modules        462

Chapter 23: Use Case 1: NetBeans Module Development        463

23.1  Introduction        463
23.2  Calling the External Tool        465
23.3  Handling the Output        476
23.4  Configuring the Tool        491
23.5  Formatting and Converting Files        496
23.6  Controlling the Conversion        505

Chapter 24: Use Case 2: Rich Unger on Application Development        521

24.1  Introduction        521
24.2  Getting Started        522
24.3  Creating Support for the audio/wav MIME Type        526
24.4  Encapsulating Audio Data in the WavDataObject        530
24.5  Creating a Component for Viewing WAV Files        533
24.6  Converting WAV Editor to Multiview        535
24.7  Creating an API for Plugging in Additional Views        542
24.8  Implementing Your Own API to Provide a New View        544

Chapter A: Advanced Module System Techniques        551

A.1  Hiding Implementation Details        551
A.2  Design for Extensibility        553
A.3  Splitting API and Implementation        555
A.4  Do I Really Need Cyclic Dependency?        559
A.5  Crossing the Informational Divide        563
A.6  Restricting Access to Friends        565
A.7  Having Public as Well as Friend API        566
A.8  A Final Word on Modularity        568

Chapter B: Common Idioms and Code Patterns in NetBeans        569

B.1  Things You Do Differently in NetBeans Than in Plain Swing Code        569
B.2  Things That Represent Files        571
B.3  Working with Lookup        573
B.4  Projects        573

Chapter C: Performance        575

C.1  Responsiveness versus Performance        577
C.2  Performance Tips for Module Authors        578
C.3  Writing Modules That Are Good Citizens        579

Index        583

Foreword

Download the Foreword

Index

Download the Index

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020