
NetBeans: The Definitive Guide
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- NetBeans: The Definitive Guide
- SPECIAL OFFER: Upgrade this ebook with O'Reilly
- A Note Regarding Supplemental Files
- Preface
- Is NetBeans for You?
- Is This Book for You?
- NetBeans and Java
- What Is JavaBeansT?
- The Core Concept of NetBeans
- NetBeans as the "Visual JDK"
- All the Usual Features
- NetBeans as a Tools Platform
- NetBeans as an Open Source Community
- Don't Be Cross that This Book Is Cross-Platform
- Contents of the Accompanying Sources
- Licensing of the Code Examples in This Book
- Writing Conventions in This Book
- Comments and Questions
- Acknowledgments
- Reviewers
- Simeon Greene
- Vaughn Spurlin
- Jack Woehr
- Jesse Glick
- Tim Boudreau
- 1. Getting and Installing the IDE
- Platforms and Requirements
- What Are the System Requirements to Run NetBeans?
- Getting and Installing a JDK
- The Java Development Kit
- Relationship of JDK to JRE
- Obtaining the JDK
- What JVM flavors and version are known to be supported by the IDE?
- Which IDE Distribution?
- Installing Binary Distributions
- Building the IDE from Source (Simple Builds)
- What You'll Need to Build the IDE
- Setting Up and Performing the Build
- Where Did Everything Go?
- How Do I Install a Newly Built Version of NetBeans?
- Running the IDE
- Minimal Environment
- How to Launch NetBeans
- Switches to the runide.sh script
- Multiple NetBeans Users
- Troubleshooting
- Launching
- X Window System issues
- Appearance once launched
- Screen resolution
- X Window System
- SDI vs. MDI
- Summary regarding windowing issues
- Updating the IDE Automatically
- The Update Center
- Configuring the Update Center
- Setup Wizard
- You're Now Running NetBeans
- 2. Concepts and Paradigms
- NetBeans and the Java Abstract Model of Computing
- Explorer
- Objects in the User Interface
- Data Objects, Nodes, Actions, and Properties
- What has NetBeans Explorer got to hide?
- Other file types
- Tabs in the Explorer
- The Filesystems view
- How to mount and unmount JARs and directories
- The Project view
- The Javadoc view
- The Runtime view
- Node Paradigms
- Explorer views of Java classes
- Badges
- Expanded view of classes
- Cut, copy, and paste subnodes
- Tools actions
- Sometimes Explorer Gets Behind the Times
- Does a file really need recompilation?
- Is a version really up to date? Is a file really local or is it already in the repository?
- Summary
- Filesystems and the CLASSPATH
- How branches of the host filesystem manifest themselves in NetBeans
- How CLASSPATH is handled in the IDE
- How to modify the IDE's CLASSPATH
- Appending and prepending CLASSPATH to the IDE's CLASSPATH
- Other CLASSPATH tricks
- Creating Packages and Classes
- Creating Packages
- Creating Classes
- Templates
- Using templates
- Creating templates
- Creating your own macros
- Services
- Compiler Services
- Compiling your code
- Compiler settings
- Execution Services
- Debugging Services
- Workspaces
- Editing
- GUI Editing
- Browsing
- Running
- Debugging
- Persistence Across Sessions
- Using Multiple Instances of Explorer
- Using Multiple Instances of the Source Editor
- Project Management
- Managing Multiple Projects
- Managing Project Builds Using Ant
- Object Browser
- Summary
- 3. Working with the Source Editor
- Why Learn a New Editor?
- Opening the Source Editor
- Context Menus
- Closing the Source Editor
- Code Completion
- Using Code Completion
- Taking advantage of code completion
- Avoiding code completion
- Updating the Parser Database to Include New Classes
- Abbreviations
- Editor Colorings
- Shortcuts
- Word Matching
- Indentation Engines and Code Formatting
- Automatic Edits
- Other Editor Functionality
- A Simple Example
- 4. Debugging
- Debugger Types
- Breakpoint Types
- Adding and Removing Breakpoints
- Setting Watches
- Starting the Debugger
- The Debugger Window
- The Variables View
- Remote Debugging in NetBeans
- Debugging Remotely
- Caveats
- Advanced Features
- 5. Compilation and Execution Services
- Using Custom Compilation and Execution Services
- Creating and Customizing Internal Compilation Services
- Creating and Customizing External Compilation Services
- Creating a new JDK 1.1 External Compilation Service
- Configuring the new JDK 1.1 External Compilation Service
- Configuring the external process
- The Internal Execution Service
- Creating and Customizing External Execution Services
- Associating Services with Java Files
- Setting Default Services for Java Files
- Setting Services for Specific Files
- Building with Ant
- Creating a Build Script
- Configuring the Ant Module
- Executing and Compiling with Ant Scripts
- Why Use Ant?
- 6. Customizing the Environment
- The Setup Wizard
- General NetBeans Settings
- Module Installation
- Update Center
- The ToolsOptions Dialog
- Configuring Toolbars
- Configuring Menus
- Configuring Editors
- Object Type Associations
- Editor Settings
- Global Key Bindings (shortcut keys)
- Fonts and colors
- Macros
- Recording and saving macros
- Editing and executing macros
- Indentation engines
- Command Line Options
- Modules
- Installing Modules
- Installing from the Web
- Installing manually downloaded NBM files
- Enabling and Disabling Modules
- 7. Using Source Control (CVS)
- What Is CVS?
- The How, When, and Why of CVS in NetBeans
- When to Use CVS
- Where to Get a Client
- NetBeans and CVS
- Using Generic VCS
- Using Command-Line CVS Support
- CVS and NetBeans Projects
- New Files and Packages
- CVS Outside of NetBeans
- Mounting CVS Sources
- Exploring Versioned Sources
- Common CVS Operations
- Checkout/Get
- Checkin and Commit
- Add and Import
- Log
- Diff
- Update
- Unexpected Results
- Spurious [Local] Designation
- Adding Directories
- Adding Binary Files
- Uncommon CVS Operations
- Branching, Merging, and Tagging
- NetBeans CVS and the Secure Shell (SSH)
- Mounting a Generic Versioning System
- One Final Tip
- 8. GUI Building
- Creating a GUI Frame or Panel
- Adding Components to a GUI Container
- Configuring Components
- Building Menus
- Changing a Container's Layout
- Working with Borders
- Accessibility
- Copying a Source Object
- The Connection Wizard
- The GridBagLayout Customizer
- Adding Event Handlers
- Using the Code Generation Properties
- Working Around Code Generation
- Containers Within Containers
- Building Complex GUIs
- 9. JavaBeans
- Why Should I Make Beans?
- Creating JavaBeans
- Creating a GUI Component
- Converting a GUI Component into a Bean
- Adding an Event Set to a Bean
- Generating a BeanInfo Class
- Adding a Design-Time Icon
- Component Palette
- Adding a Category to the Component Palette
- Adding a Bean to the Component Palette
- Component Palette Problems
- 10. Using Javadoc
- Javadoc Support in NetBeans
- Mounting Javadocs
- The Javadoc Search Tool
- Creating Javadoc
- The Auto Comment Tool
- Javadoc filtering
- Viewing, editing, and correcting Javadoc comments
- Javadoc Generation
- Javadoc Search Types
- Javadoc Executors
- Doclets
- Adding content
- Adding links
- Customizing the HTML format
- Additional properties
- 11. Working with XML
- Installing XML Support
- Overview
- Templates
- Browsing and Editing
- Generating Documentation
- Accessing with Java
- XML Schema Support
- XML Editors
- Beyond Editing XML
- Checking and Validating XML
- Setting the Node View
- Generating a DTD
- Generating Documentation
- Generating CSS
- Generating Java Classes
- Generating a SAX Document Handler
- Generating a DOM Tree Scanner
- 12. Developing Web Applications
- Why the IDE Supports Web Application Development
- How the IDE Provides Web Application Support
- Creating a Web Application
- The Filesystems View
- The Web Project View
- Working with JSP and HTML Files
- Advanced Web Applications Features
- Executing Web Applications
- Working with Servlets
- Viewing JSPs as servlets
- Adding servlets
- Adding a new servlet
- Adding an existing servlet
- Executing servlets
- Passing request parameters
- Packaging and Deploying Web Applications
- Deploying Web Applications
- Configuring Tomcat
- 13. Extending NetBeans
- What's Different About NetBeans?
- The Core and the Open APIs
- The License
- Open Source
- The netbeans.org Web Site
- Registration
- Bug tracking
- Ways to participate
- The netbeans.org FAQs and mailing lists
- NetBeans for Bean Counters
- Getting and Installing the Open APIs Support Module
- Life Is Change
- Source Code for the Examples
- 14. Understanding the NetBeans APIs
- Design Philosophy of NetBeans
- Abstracting the Abstractions-the Open APIs
- Modularity
- Hierarchy, Files, and Nodes
- Everything Is a File-Virtually
- Mapping Files to Java Objects
- The System Filesystem
- Module Layers
- Layers in the System Filesystem
- Exploring the System Filesystem
- Data Objects-Wrappers for Persistent Data
- NetBeans and JavaBeans
- Nodes-the Application as Hierarchy
- Presenting Nodes to the User-Explorer
- User-Level Customization
- Nodes in Action
- Adding to the Component Palette using Paste Link
- Rearranging actions/toolbar contents/menu contents
- Pasting a compiled class to a menu and executing it from there
- Modules-Overview
- How Modules Add Functionality
- How Modules Install Virtual Filesystem Layers
- What Modules Can Do
- Disabling Modules
- An Illustration-NetBeans with No Modules
- Interacting with the IDE
- Setting the Status Bar Text
- Setting the Current Workspace
- 15. The Open APIs
- APIs versus Core versus Modules
- Service Provider Interfaces and Client APIs
- Overview of the APIs and Their Purposes
- Modules
- Module manifests
- XML layers
- Ordering files in XML layers
- Lookup and the Services API
- Lookup, .settings files, the system filesystem, and layers
- Commonly used or interesting classes in this package
- Services
- Nodes
- Commonly used or interesting classes in this package
- Datasystems
- Explorer
- Actions
- Options
- Compiler
- Editor
- Windowing System
- Cookies
- Cookies and supports
- Execution
- Java Hierarchy
- Filesystems
- Modules, JARs, and Class Loaders
- Threading, Deadlocks, andHow to Avoid Them
- 16. Developing Modules-the New Module Wizard
- The HelloWorld Module
- Creating a Module Using the New Module Wizard
- The Source Files
- 17. Internals of the Running IDE
- The Activated Node(s)
- Cookies
- A Peek under the Hood
- Touring NetBeans with the Bean Browser
- Data Objects, Nodes, and Cookies
- Filesystems and the Repository
- Services
- Lookup
- Options
- UI Components
- TopComponents, Modes, and Workspaces
- Browsing the window system in the system filesystem
- XML format for workspaces, modes, and components
- Actions
- Presenters
- Custom Property Editors
- Localization
- Wizards
- Jumping-off Places
- Special Folders in the System Filesystem
- 18. Creating the QuickPanel Module
- Abstractions Covered in This Chapter
- Creating the Project Files Drop-Down
- FilterNode-Filtering Which Children of a Node Are Displayed
- Creating the Methods Drop-Down
- Improving the Methods Drop-Down
- Creating the Module
- Creating a Container GUI Component
- Creating the ShowQuickPanelAction
- Creating the XML Filesystem Layer
- Creating and Populating the Module JAR
- Building and Testing the Module
- A Little Homework
- 19. A Mail-Based Filesystem
- Building a Mail Reader in the NetBeans Paradigm
- Implementing MailFileSystem Using AbstractFileSystem and JavaMail
- Creating a New AbstractFileSystem Implementation
- Mail Filesystem: AbstractFileSystem.Info
- Mail Filesystem: AbstractFileSystem.List
- Mail Filesystem: AbstractFileSystem.Change
- Mail Filesystem: AbstractFileSystem.Attr
- Other Parts of AbstractFileSystem
- Creating Folder Objects for Attachments
- Using FileSystem.Status Annotations to Mark Unread Messages
- BeanInfo-Displaying Filesystem Properties
- Using the Wizard Framework to Set Up Mail Accounts
- Creating Wizard Classes
- The IMAP Mail Server Template Wizard
- 20. Creating the User Interfacefor the Mail Client
- Creating a DataLoader for Messages
- Displaying and Editing Simple Messages and Unnamed Attachments
- Handling Multipart Messages
- Creating a Threaded Mail View Using Filter Nodes
- Making a Basic Mail View
- Making a Threaded Mail View as an Alternative
- Creating a Mail Workspace
- 21. Score File Support
- Overview-Functionality to be Implemented
- Creating the Minicomposer Module
- Creating the Manifest
- Creating the Layer
- Creating a JAR File Using Ant
- Creating a UniFileLoader and MultiDataObject for *.score Files
- Creating an Editor Support for Scores
- Creating a Fixed ExecCookie to Play Scores
- Creating a Simple Template
- 22. Creating a Structural View of the Score
- Creating a ScoreCookie to Represent a Sequence of Notes
- Examples of State-Based Supports
- Creating a ScoreSupport
- Why a Document Is Used
- Implementation of ScoreSupport
- Lifecycle of the Score
- An OpenSupport
- Creating an OpenCookie Implementation
- Showing a GUI View of the ScoreCookie
- Indicating Parse Errors on the Node
- 23. Compiling Scores
- Creating the Compilers
- Creating and Using the Compiler Cookie
- Displaying an Out-of-Date Badge on Score Icons
- 24. Executing Scores
- Creating the .au Player Executor
- The Internal Player
- The External Player
- Registering the Players as Services
- Creating Player Configuration Support
- Creating a SystemOption for the Default Executor
- 25. Better Score Support in the Explorer
- The Clip Length Property
- Clearing the Cache and Firing Changes
- Adding the Property to the Property Sheet
- Representing Notes as Subnodes Using Children.Keys
- Using Keys to Model Children
- Being Lazy and Cleaning Up
- Creating the Subnodes
- Attaching the Children to the Parent
- Permitting Subnodes to Be Renamed or Deleted
- Deletion of Notes
- Renaming of Notes
- Permitting Subnodes to Be Added
- Making Read/Write Properties on Subnodes
- Reordering Subnodes
- Data Transfer-Cut, Copy, and Paste of Notes and Sequences
- Overview of the Transferables
- Cutting and Copying
- Pasting
- Drag & Drop
- Converting Score Text, Text Score, Several Scores One
- 26. Tuning Modules for Performance & Memory Footprint
- Startup Performance vs. Runtime Performance
- Operating Principles
- "Nobody Will Ever Use My Module"
- What Does My Module Really Need to Do on Startup?
- What Are the Critical Paths?
- Techniques
- Lazy Initialization
- Avoid Static Initializers
- Avoid ModuleInstall Classes-Use XML Layers Instead
- .settings files
- Batching results of expensive operations
- Partial Loading Considerations-InstanceCookie and InstanceDataObject
- Use URLs Instead of CDATA Sections in XML Layers
- Reduce the Number of Classes You Create
- GUI Components-Wait for addNotify( )
- Using the addNotify( ) and removeNotify( ) Pattern Where Exposed by Non-GUI Classes
- Use Weak and Soft References for Objects
- Utility classes that can help
- Use WeakListener
- Avoid Excessive Event Firing
- Avoid Overuse of Threads
- Batching Events
- Swing Performance
- 27. Producing Modules (Packaging & Distribution)
- Versioning
- Version Numbers and What They Mean
- Specifying Dependencies
- Managing Inter-Module Dependencies
- Routine and compatible upgrades
- Incompatible upgrades
- Module dependencies and relative order
- Upgrading User Settings
- Settings History and Physical Format
- Upgrade Scenarios for Settings
- Serialized settings
- Templates and saved files
- Actions
- Window system elements and custom formats
- What Happens When a Module Is Disabled?
- User Development Data
- Bundling Extension Libraries
- Referencing Libraries with Class-Path
- Using Autoload Library Modules
- Ad-Hoc Resources and Module Installer Validation
- Internationalization and Accessibility
- I18N and L10N
- A11Y
- JavaHelp-Writing and Distributing
- Creating a Help Set
- Adding a Help Set to NetBeans
- Adding Context Help
- Separating Help from Code
- Supporting User-Level Java APIs
- Supplying a Parser Database
- Bundling Javadoc
- Adding to the Default Classpath
- Templates
- Bean Installation
- Creating the Module JAR File Within the IDE
- Creating a Build Script Using Ant
- Producing the .nbm File
- Publishing Using the Update Center
- Using ErrorManager to Log Problems
- Testing
- 28. Building Your Distribution of NetBeans
- Do You Need Your Own Distribution?
- Licensing
- Selecting a Baseline
- Getting the Sources
- Customizing the Build Process
- Adding Modules to a "Stock" Distribution
- Creating Preconfigured Settings
- Branding
- Implementing Branding on a Distribution
- Simple Branding: Text Strings and Images
- Configuration Branding: Menu Bar, Workspaces, and More
- Replacing a file
- Adding a file
- Removing (masking) a file
- Using the Open APIs Support to brand layers
- Advanced Branding: Patching Behavior
- A. A Tour of Existing Modules
- Modules That Expose Functionality You Might Need
- The XML Modules
- The Editor
- Version Control-the VCS Core Module
- RemoteFS
- The Ant Module
- The Java Module
- Debugger Core
- J2EE Server
- Form Editor
- HTTP Server Module
- Classfile Reader Module
- The Metadata Repository-a Whole Host of APIs
- Socket-Based Editor Support-the External Editor Module
- Incidental APIs, Utilities, and Extensions
- The Utilities Module
- API Extensions (openidex)
- Modules That Make Good Examples for Things You May Need to Implement
- Annotations and Dynamic Editor Tool Tips-the Ant Module and the Debugger Core Module
- Adding Information to the View of Java Sources-the Beans Module
- Adding a Debugger Type-the Applet Module
- Multiplexing DataObjects and Complex Cut/Copy/Paste Support-the Properties Module
- Working with Network Protocols to Access Files-JavaCVS and RemoteFS
- Domain-Specific XML Support-the Tomcat and Ant Modules
- Stretching the Limits-the Web Modules
- Complex Syntax Coloring-the JSP Module
- Multi-Stage Compilation-the JSP, RMI, and CORBA Modules
- Bridging to an Entirely Different Build System-the Ant and Makefile Modules
- Use of the Compiler Infrastructure for Non-Compilation Tasks-the JAR Packager Module
- Execution-the Applet and JSP/Servlet Modules
- Custom Hyperlinking in the Output Window-the Ant Module
- Specifying Windows, Workspaces, and Components Using XML-the Core Window System and the Form Editor Module
- Complex Work with MIMEResolvers and Multi-File DataObjects-the CPP Module
- Cut/Copy/Paste-Data Transfer Support for Complex Elements-the Ant and Java Modules
- Interconversion between Different Types of Clipboard Contents-JNDI, CORBA, and RMI
- Integrating Other Programming Languages-the C++/Fortran, Scripting, and WebL Modules
- Fancy Footwork with Nodes-the Java Module
- Adding Nodes to the Runtime Tab in the Explorer-the RMI, CORBA, JNDI, and Database Explorer Modules
- The Bare Essentials of Non-Data-Driven Nodes-the System Properties Module
- Wizards-the CORBA, Java, and New Module Wizard Modules
- Embedding Property Panels into Wizards-the Java Module
- Complex Explorer Views-the Debugger Core Module
- Enabling/Disabling Sets of Actions Based on Context-the VCS Core Module
- B. Useful Utility Classes
- XML Utilities
- org.openide.xml.XMLUtil
- org.openide.xml.EntityCatalog
- Visual Components and Extensions to Standard Swing Components
- Lookup Implementations
- Threading
- Miscellaneous Utility Classes inorg.openide.util
- Serialization Helpers
- C. Resources
- CVSHome
- GNU/BSD/Other Operating Systems
- CVS GUI Clients
- Java Environments
- Java Tools
- Apache Software Foundation
- Secure Shell (SSH) Resources
- Cygwin for Windows
- Newsgroups and Mailing Lists
- Web Sites
- Organization of Main NetBeans Web Site
- Sun Sites
- NetBeans Open Source Projects with Design Forms in the Distribution
- Java-Oriented IDEs Other Than NetBeans
- D. Future Plans
- Declarative Instantiation
- Uniform Lookup
- Datasystems II
- The Looks API
- Declarative Actions
- Deprecation of IDE-Specific Functionality in the Open APIs
- The Metadata Repository
- Standards Employed by the MDR
- Project Support
- E. Working with Open Source and NetBeans
- Practices
- Governance
- Consensus
- The mechanics of consensus
- How to Get Involved
- The mechanics of contribution
- The Lifecycle of Module Development
- Resources
- CVS (Concurrent Versioning System)
- Projects
- Mailing Lists
- CVS mailing lists
- Issue mailing lists
- Issuezilla
- Interacting Effectively on Mailing Lists
- F. Additional Modules and Where to Find Them
- Open Source Modules Available Via the Update Center
- The Modules Marketplace on Flashline
- IDEs That Are Distributions of the NetBeans IDE
- Open Source Application Projects Based on NetBeans
- Commercial Applications Built on the NetBeans Platform
- Commercial Modules Available for NetBeans
- Should You Create Your Own Update Server?
- Index
- About the Authors
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O'Reilly
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.