I have a Node.Property. I want to control its appearance or custom editor somehow. What options are available?
NetBeans built-in property editors support a number of "hints" which will affect how the property editor behaves. A few are global to all property editors; the rest are specific to property editors for specific types.
Note that all of these are hints - a property editor is free to ignore them or not support them in the future. However all of these have been present since NetBeans 3.6 and are should still work as of NetBeans 6.9.
Property Type | Hint Name | Value Type | Effect |
---|---|---|---|
Any |
|
|
Causes the property not to show a […] button in the property sheet |
Any |
|
|
Causes the property not to show an icon beside the value (should be 16x16 or smaller) when not in edit mode |
Most editors (string, etc.) |
|
|
An HTML-ized string which should be rendered using HTML rendering, not literally. The subset of HTML supported by org.openide.awt.HtmlRenderer is supported. Generally the value should be a formatted variant of the actual value - otherwise when the user edits the value, it will suddenly seem to have changed. |
All property editors |
|
|
An icon which should be displayed next to the property name in the property sheet (16x16 or smaller) |
All property editors |
|
|
A JavaHelp help ID to provide custom help for this property’s custom editor (not when the property sheet has focus) |
All property editors |
|
|
An action which should be invoked after the property sheet has updated the property’s value from the property editor (not very useful unless you need access to the |
|
|
|
A string which should be the initial value when the user starts editing, even if the actual property value is null |
Most editors (string, etc.) |
|
|
An HTML-ized string which should be rendered using HTML rendering. Has effect only when a cell in the property sheet or tree table or outline is not in edit mode. |
Any editor that shows a combo box in the property sheet |
|
|
Causes the combo box to be editable by text entry |
|
|
||
|
|
|
The delimiter for splitting a user entered string into an array (the default is a , character) |
|
|
|
Keys - allows an integer editor to show a combo box with strings, instead of a text editor. If this property is used, the additional hint |
|
|
|
The values that map to the strings passed in the |
|
|
|
The value that should be returned by the property editor’s |
|
|
|
Alternate names to show instead of |
|
|
|
Localized instructions to the user which should be visible above the text field/area in the custom editor |
|
|
|
Instruct the custom editor to use a single-line JTextField instead of a mult-line JTextArea |
|
|
|
An array of images the user can select from |
|
|
|
Names for the images passed in the |
|
|
|
An array of descriptions corresponding to the array of images passed in the |
|
|
|
The superclass, passed to |
|
|
|
The value the editor should show if the property initially has a value of null |
|
|
|
A specific lookup for this editor to query for possible values, instead of using the default lookup |