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. Then choose BeanInfo Editor from the
pop-up 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.
appears
next to the subnode if the property, event source, or method is designated to
be in the BeanInfo class.
appears
next to the subnode if the property, event source, or method is designated to
be excluded from the BeanInfo class.
You can use the Include in BeanInfo property for a node to determine whether or not the
property, event source, or method is included
in the BeanInfo class.
BeanInfo elements are organized under the following nodes:
BeanInfo
Bean
Properties
Methods
Event Sources
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 Sources and Methods Nodes
Get From Introspection. If not selected, 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.
If Get From Introspection is selected, 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.
Use Lazy Initialization. If not selected, the code is initialized in a static
initializer.
Properties for the Bean, Properties, Event Source, and Methods Subnodes
The following properties are available for the nodes for each bean, property,
event sources, and method:
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 selected, 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 selected, 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 selected, makes the bean property .
Constrained. If selected, 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 selected, marks the even set as being in
the "default" even set.