The BeanInfo Editor dialog box enables you to edit the elements of a BeanInfo
class. To open this dialog box, right-click the Bean Patterns node of the class
whose BeanInfo you want to create or update. Choose BeanInfo Editor from the
contextual menu.
The IDE searches through the class hierarchy of the selected class for elements
that match bean-naming conventions. All matching elements are displayed in the
left of the BeanInfo Editor dialog box. You can select any element's node to
view and edit its properties in the right of the dialog box.
BeanInfo elements are organized under the following nodes:
BeanInfo
Bean
Properties
Methods
Event Sources
Each of these nodes has a property called Get From Introspection. If this property
is set to false, the node's subnodes are available for inclusion in the BeanInfo
class. You can include all of a node's subnodes in your BeanInfo class by right-clicking
a node and choosing Include All. You can include each element individually by
selecting its subnode and setting its Include in BeanInfo property.
When Include in BeanInfo is True, appears
next to the subnode. When Include in BeanInfo is False, appears.
Other node icons in the BeanInfo Editor have the same meaning that they have
in the Filesystems window, as described in Node Icons in the Filesystems Window.
If Get From Introspection is set to true, the node's subnodes are dimmed and
the elements they represent are taken from introspection when the bean is used.
Setting the properties of dimmed subnodes has no effect in the generated BeanInfo
code.
BeanInfo Node Properties
Icon Properties. These properties enable you to designate icons for
the bean by entering the class path for the graphic file you want to use.
Click the ellipsis (...) button to display a dialog box that lets you search
for the desired class path and displays the icon when the class path has been
found.
Default Property Index. The index of the default property in the
PropertyDescriptor array.
Default Event Index. The index of the default property in the
EventDescriptor array.
Properties for the Bean, Properties, Event Source, and Methods Nodes
The following properties are available for Beans, Properties, and Event Sources:
Name. Provides the name of the selected element as it appears in
code.
Preferred. Specifies where this property appears in the Inspector
window. If any bean properties are marked as Preferred, the Preferred properties
are displayed under Properties in the Inspector window's and all other properties
are displayed under Other Properties.
Expert. Specifies where this property appears in the Inspector window.
If no properties are marked as Preferred, all properties marked Expert are
displayed under Other Properties in the Inspector window. All non-Expert properties
are displayed under Properties.
Hidden. If set to True, marks the selected element as intended only
for tool use. Hidden properties do not appear in IDE property sheets.
Display Name Code. Specifies the display name of the property. This
property is used as parameter to the setDisplayName method for the
selected element. This property's value should be null, a quoted string, or
code that evaluates to the desired string.
Short Description Code. Specifies the short description of the property.
This property is used as parameter to the setShortDescription method
for the selected element. This property's value should be null, a quoted string,
or code that evaluates to the desired string.
Include in BeanInfo. If set to True, indicates the selected element
is included in the BeanInfo class.
The IDE shows different Expert properties for each type of node. Method nodes
in the BeanInfo Editor do not have Expert properties. For Properties nodes,
the following Expert properties are available:
Bound. If True, makes the bean property .
Constrained. If True, makes the bean property .
Mode. Sets the property's mode and generates getter and setter
methods accordingly. Choose Read Only to generate a getter method, Write Only
to generate a setter method, and Read/Write to generate both.
Property Editor Class. Specifies a custom class to act as a property
editor for the property.
For Event Source nodes, the following Expert properties are available:
Unicast (read-only). Displays whether the event source is unicast.
In Default Event Set. If True, marks the even set as being in
the "default" even set.