New Property Editor dialog box
Use the New Property Editor dialog box to create a special editor to edit a property in your component.
To display this dialog box,
- Select your component in the Navigation pane.
- Click the Bean tab to display the BeansExpress designers.
- Click the Editors tab to display the Property Editors Designer.
- Click the Create Custom Editor button.
Editor Data
Editor Name
Specify the name of the property editor class. It should have the same name as the property it is going to edit with Editor appended. For example, if your property name is price, the editor name should be PriceEditor.
Editor Type
Choose the type of editor. These are your choices:
- String List - a list of strings from which the user chooses.
- String Tag List - a list of strings from which the user chooses. When the user makes a choice, a Java initialization string is used to set the property value.
- Custom Editor Component - a component you created as an editor for the property.
Editor Details
The Editor Details section of the dialog box varies, depending on the Editor Type chosen.
String List Editor Details
Add Entry
Click Add Entry to add row to grid below. Within the grid, type in one of the entries you want to appear in list of strings the user sees.
Remove Entry
Click Remove Entry to remove the selected row in the grid below.
String Tag List Editor Details
Add Entry
Click Add Entry to add row to grid below. Under Visible String, type in one of the entries you want to appear in list of strings the user sees. For the Java Initialization String, type in the code you want JBuilder to use in the code it generates.
For example, if the Visible String is Black, the Java initialization code might be one of these:
- new Color(0, 0, 0)
- Color.black
Note: If you want to include a string in Java initialization string, put quotation marks(") before and after the string, as if you were entering it in source code.
Remove Entry
Click Remove Entry to remove the selected row in the grid below.
Custom Editor Component Details
Custom Editor Name
Enter the name of the custom editor you created to edit the property.
Support paintValue()
Check this option if your custom editor component paints itself.