Contents

Foreword

Preface

About the Authors

Chapter 1 A Tour of the NetBeans Platform

What You Will Learn

1.1 Background Basics

JavaFX Integration

1.2 The NetBeans Platform: The Big Picture

Module System API

Lookup API

Window System API

File System API

Nodes and Explorer Views

But Wait . . . There’s More

1.3 FamilyTreeApp Reference Application

FamilyTreeApp and JavaFX

JavaFX 3D Integration Possibilities

1.4 Documentation

1.5 How to Get Java and the NetBeans Platform Software

1.6 Example Software Bundle

1.7 Key Point Summary

Chapter 2 Background Basics

What You Will Learn

2.1 JavaBeans and Properties

Creating a Java Application

Bound Properties

Coarse-Grained Notification for JavaBean Objects

2.2 Lambda Expressions

Lambda Expressions with Functional Interfaces

Functional Data Structures

2.3 Swing Basics

Creating a GUI-Form Project

Swing Form Designer

Program Structure

Single-Threaded Model

Java Logging Facility

Using Swing Components

Event Handlers and Loose Coupling

2.4 Improving the User Experience

2.5 Concurrency and Thread Safety

Thread-Safe Objects

Adding Listeners and Thread Safety

Concurrency in Swing

2.6 Swing Background Tasks

Introducing SwingWorker

Monitoring SwingWorker Status

2.7 Key Point Summary

What’s Next?

Chapter 3 Introduction to JavaFX

What You Will Learn

3.1 What Is JavaFX?

A Bit of History

The Scene Graph Metaphor

Single-Threaded Model

3.2 Building JavaFX Programs

Creating a JavaFX Application

Java APIs

Creating a JavaFX FXML Application

CSS Files

Animation

3.3 JavaFX Properties

What Is a JavaFX Property?

Using Listeners with Observable Properties

Read-Only Properties

Binding

3.4 Putting It All Together

3.5 Key Point Summary

What’s Next?

Chapter 4 Working with JavaFX

What You Will Learn

4.1 Creating JavaFX Properties

JavaFX Properties with Lazy Evaluation

Object Properties

Immutable Properties

Computed Properties

Methods equals() and hashCode()

4.2 Using JavaFX Properties in a JavaFX Application

Creating a JavaFX FXML Application

4.3 Observable Collections

4.4 JavaFX Applications

Program Structure

Scene Builder and FXML

JavaFX Controls

JavaFX Controller Class

4.5 Concurrency and Thread Safety

Concurrency in JavaFX

Observable Properties and Thread Safety

4.6 JavaFX Background Tasks

Worker and Task

ProgressIndicator

4.7 Monitoring Background Tasks

Using Method updateValue()

Updating a Read-Only JavaFX Property

Updating the JavaFX Scene Graph from a Background Task

4.8 Key Point Summary

Chapter 5 A Taste of Modularity

What You Will Learn

5.1 Modular Architecture

Modules

NetBeans Runtime Container

5.2 Creating a NetBeans Platform Application

5.3 Creating Modules

Creating a NetBeans Module

Creating Additional Modules

5.4 Configuring a Module with Public Packages

5.5 Registering a Service Provider

Global Lookup

5.6 Configuring a Window for Selection

Porting Swing UI Code to a TopComponent

Lookup API

Configuring the TopComponent

5.7 Configuring a Window with Form Editing

Another Look at Lookup

5.8 Module Life Cycle Annotations

Using @OnStart

Using @OnStop

5.9 What We Know So Far

5.10 Key Point Summary

What’s Next?

Chapter 6 JavaFX Integration

What You Will Learn

6.1 JavaFX and the NetBeans Platform

Java 8 and JavaFX 8 Enhancements

Create a NetBeans Platform Application

Create a NetBeans Module

Add a Window to the Module

Add JavaFX Content to the TopComponent

The Magic of JFXPanel

SwingNode

6.2 Communication Strategies

Accessing the JavaFX Controller Instance

6.3 Integrating with the NetBeans Platform

Create a NetBeans Platform Application

Create NetBeans Platform Modules

Configure a Module with Public Packages

Register a Service Provider

Configure a Window with JavaFX for Selection

Configure a Window with JavaFX for Form Editing

6.4 Key Point Summary

Chapter 7 Nodes and Explorer Views

What You Will Learn

7.1 The NetBeans Model View Controller

7.2 Nodes

NodeListener and PropertyChangeListener

Building a Node Hierarchy

Displaying the Node Hierarchy

A Multi-Level Node Hierarchy

Using BeanNode

Creating Your Own Property Sheet

Using FilterNode

7.3 Explorer Views

Quick Search

BeanTreeView

OutlineView

Master-Detail View

PropertySheetView

7.4 Creating a Selection History Feature

Add Features to Your Application

7.5 Key Point Summary

Chapter 8 NetBeans Platform Window System

What You Will Learn

8.1 Window Framework Overview

Window Layout

Window Modes

TopComponents

Window Operations

Limiting the Window System’s Behavior

Window Switching

Window Tab Customization

Window Manager

8.2 TopComponent Basics

TopComponent Java Code

Window Header Animated Notifications

8.3 TopComponent Persistence

Windows2Local Folder

8.4 TopComponent Client Properties

8.5 Creating Non-Singleton TopComponents

Opening Windows from User Code

8.6 Window System Life Cycle Management

Using the Window Manager

Using @OnShowing

8.7 TopComponent Modes

8.8 Window Groups

Window Group Example

8.9 Window Layout

Creating TopComponents

A View-Only Window Layout

8.10 Window Layout Roles

RoleExample Application and Role-Based TopComponents

Credential Checking and Role Assignments

LoginTopComponent

8.11 Key Point Summary

Chapter 9 Action Framework

What You Will Learn

9.1 Type of Actions

Always-Enabled Actions

9.2 Actions and Lookup

Callback Actions

Context-Aware Actions

9.3 Editing the Node Hierarchy

Group Window Node Actions

Reorder and Index.Support

Implementing Drag and Drop

Implementing Cut, Copy, Paste, Delete

9.4 Inter-Window Drag and Drop

Trash Window Node Actions

Implementing Drag and Drop Delete

9.5 Key Point Summary

Chapter 10 Building a CRUD Application

What You Will Learn

10.1 Create-Read-Update-Delete Application

Defining Capabilities

Implementing Read

Implementing Delete

Implementing Create

Implementing Update

10.2 Using CRUD with a Database

Create Wrapped Libraries

JavaDB Server and Database

Implement FamilyTreeManager

10.3 Concurrency in the FamilyTreeApp Application

Concurrency with Read

Concurrency with Delete and Create

Concurrency with Update

10.4 Key Point Summary

Chapter 11 Dialogs

What You Will Learn

11.1 Dialog Overview

11.2 Standard Dialogs

NotifyDescriptor.Message

NotifyDescriptor.Confirmation

NotifyDescriptor.InputLine

11.3 Customizing Standard Dialogs

11.4 Custom Dialogs

Error Handling

11.5 Custom Login Dialog

11.6 Putting It All Together

RoleExample Application

11.7 Key Point Summary

Chapter 12 Wizards

What You Will Learn

12.1 Wizard Overview

12.2 The Wizard Wizard

A Bare-Bones Wizard

Registering a Wizard’s Action

12.3 Wizard Input

12.4 Wizard Validation

Coordinating Input with Other Panel Wizards

Visual Panel Updates

12.5 Simple Validation API

Prepare to Use the Validation Library

Using the Simple Validation API Library

Using a Custom Validator

12.6 Finishing Early Option

12.7 Asynchronous Validation

12.8 Dynamic Sequence Wizards

Building the Dynamic Step Wizard

The PizzaWizardIterator

IdentifyCustomer Panel

BuildPizza Panel

Create the OrderPizzaAction

12.9 Wizard Instantiating Iterators

12.10 Key Point Summary

Chapter 13 File System

What You Will Learn

13.1 File System API

13.2 The File System API Overview

Exploring the FileSystem API

The Output Window

Create a Folder

Get or Create a File in a Folder

Write to and Read from Files

Rename and Delete Files

File System API Useful Methods

13.3 Monitoring File Changes

FileObject Attributes

Favorites Window

Implementing the FileChangeListener

13.4 Including a File with Your Application

Install a File in a Module

Using the InstalledFileLocator Service

Installing an NBM in NetBeans IDE

13.5 The Layer File and System FileSystem

Layer Files and Configuration

Exploring the System FileSystem

Using the Layer File for Inter-Module Communication

13.6 Key Point Summary

Chapter 14 Data System

What You Will Learn

14.1 Data System API Overview

FileObject, DataObject, and Node

FileObject MIME Type and Lookup

DataObject Factory and DataObject Lookup

Accessing FileObjects from DataObjects

DataObjects and Nodes

Using DataNode and Lookup

14.2 Creating a New File Type

Create a New File Type

Create and Edit a New FTR File

Provide Child Nodes Based on Content

14.3 Working with MultiView Windows

Using the Visual Library

Using JavaFX

14.4 Creating an XML-Based File Type

Create a New XML File Type

Add the XML Text Editor

Add JavaFX Content

14.5 Key Point Summary

Chapter 15 JavaFX Charts

What You Will Learn

15.1 JavaFX Charts and the NetBeans Platform

Application Overview

Working with AbstractTableModel

Working with Swing JTable

Integrating JavaFX Charts

15.2 Introducing JavaFX Charts

JavaFX Chart Overview

15.3 Data Visualization with JavaFX Charts

Line Chart

Scatter Chart

Bar Chart

Area Chart

Stacked Area Chart

Stacked Bar Chart

Bubble Chart

Pie Chart

15.4 Adding Behaviors to JavaFX Charts

Accessing JavaFX Chart Nodes

Adding PieChart Features

15.5 Saving Charts

15.6 Key Point Summary

Chapter 16 Using Web Services

What You Will Learn

16.1 RESTful Web Services and the NetBeans Platform

16.2 Creating RESTful Web Services

Create Database

Create RESTful Web Service Application

RESTful Services from Database

Entity Classes and JavaFX Properties

Test the Web Services

16.3 A Java Application Web Service Client

16.4 RESTful Web Services in a NetBeans Platform Application

Generate RESTful Web Service Clients

Application Overview

Using JavaFX Services

Implementing a RESTful Client Service Provider

JavaFX TableView

JavaFX Chart Module

16.5 Key Point Summary

Chapter 17 Branding, Distribution, and Internationalization

What You Will Learn

17.1 What Is Branding?

Using the Branding Menu

Customizing the Application Title

Customizing the Splash Screen

17.2 Application Updates

Enable Updates of Your Application

Create an Update Center

Dynamically Uninstall a Module (Plugin)

Adding Modules to an Application

Install a Plugin

17.3 Application Distribution

Create an Installer

Installing the Application

Customizing the Installer Images

17.4 Application Internationalization

Internationalization and Java

Internationalization and the NetBeans Platform

Number Formatting

Editing Properties Files

Internationalization and JavaFX

Testing Target Locales

NetBeans Platform Application Internationalization

Customizing Resource Bundles

17.5 Key Point Summary

Index

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

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