Special File Attributes

Files inside a layer display an additional tab in the Property Sheet, Extra, which can be used to quickly set some special file attributes which are useful for layers. In all cases, you can enter values as text, or by choosing a value via a popup dialog after clicking ..., or clear the attribute by clearing its text value or right-clicking the property and selecting Restore Default Value.

Choosing a Custom Template Wizard

Sequence of Panels lets you set an alternate sequence of panels for a template in the New from Template wizard, permitting you to arbitrarily customize the handling of your template's instantiation. This is a very powerful capability, especially for complex or difficult-to-configure templates. To use this property, you must first write an "iterator" describing how the wizard should treat your template. To do this, create an implementation of org.openide.loaders.TemplateWizard.Iterator (see the API documentation for details on what it should contain), and compile this code.

Now in the helper property, you can type in the class name of your implementation, or browse to it with the ... button and select the class you wish to use. You may also create a serialized JavaBean prototype of the implementation using Customize Java Bean, then browse to this serialized form instead.

Template Wizard Description Pane

Description URL lets you associate a Web page with the template as a description which will be shown in the first panel of the wizard, and will help your users determine what the template does. Just type in a URL.

Usually the URL will be of the form nbresloc:/path/to/myhelp/description.html, which is a special URL that will automatically look for that resource inside your module and also localize it if needed. As a shortcut to typing in such a URL, just click ... to browse to the description file in the Filesystems tab. Make sure to include that HTML file inside your module JAR.

Human-Readable Display Name

Localizing Bundle shows the bundle used to localize the given file, if any. It is specified as a dot-separated abstract path (i.e. the actual resource path is computed based on the current locale). You may choose ... to browse to a bundle file, or type in the name. The localized name is set by means of there being a key in the bundle with the same name as the file's full resource path, e.g. Palette/Beans (a directory) or Palette/Beans.ser (a file). In the case of forms and other multi-file objects, only the primary file (*.java) need be specified. Make sure to include the bundle file inside your module JAR.

There is also a tool to generate the bundles for a number of localized files at once. First set the bundle path for all files (and directories) you will want to localize. (The quick way is to expand all the paths under the layer, click and shift-click to select all the data nodes, then set the Localizing Bundle property on all of them at once.) Now select a file, or several, or a whole directory--in the context menu is Generate bundle .... The action will show in the Output Window what it is doing--it will add keys for the selected file(s) to the proper bundle (only in the default locale), where the values will be the same as the file names (i.e. the localization will not yet affect display). Then you can edit the bundle to use different names and watch the effects on the Localized Name property.

Custom Display Icon

Icon may be used to set a non-default icon for the file. This is useful for some templates, Component Palette beans, URL bookmarks or menu items, etc. You can click ... to browse to an image; make sure to include it in your module JAR.