C H A P T E R  22

Palette API

In Chapter 21, you created a palette. From this palette you could drag music albums on the top component (which you implemented yourself) via drag-and-drop. As indicated, it is also possible to register a palette for a certain file type. This means that when a file of this type is opened in the NetBeans editor, the palette registered for this type is automatically opened. The following example will show how this actually works.

Let's assume you want to provide a palette for manifest files (.mf) (see Figure 22-1). First you define the items, which will be provided on the palette, each with an XML file and a class. Then you register this item in the layer file. Afterwards, you implement a class that creates a palette ...

Get The Definitive Guide to NetBeans™ Platform 7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.