BeanInfo Editor Dialog Box
The BeanInfo Editor dialog box enables you to edit the elements of a BeanInfo
class. To display 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 heirarchy 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 have 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-click a node and choose Include All or Exclude 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 Explorer, as described in Node Icons in the Explorer.
If Get From Introspection is set to true, the node's subnodes are gray
and the elements they represent are taken from introspection when the
bean is used. Setting the properties of gray subnodes has no effect
in the generated BeanInfo code.
BeanInfo Node Properties
- Icon Properties. Enable you to designate icons for the bean by
entering the classpath for the graphic file you want to use. Click
the ellipsis (...) button to display a dialog box that lets you search
for the desired classpath and displays the icon when the classpath 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 Bean, Properties, Event Source, and Methods Subnodes
- Name. Name of selected element as it appears in code.
- Preferred. If any bean properties are marked as Preferred, the Preferred
properties are displayed in the Component Inspector's Properties tab and all
other
properties are displayed in the Other Properties tab.
- Expert. If no properties are marked as Preferred, all non-Expert
properties are displayed in the Component Inspector's Properties tab and all
properties marked Expert are displayed in Other Properties.
- Hidden. If set to true, the selected element is intended for tool use
only and does not appear in IDE property sheets.
- Display Name Code. Is used as parameter to the setDisplayName
method for the selected element. Should be null, a quoted string, or code that
evaluates to the desired string.
- Short Description Code. Is used as parameter to the setShortDescription
method for the selected element. Should be null, a quoted string, or code that
evaluates to the desired string.
- Include in BeanInfo. If set to true, the selected element is included in the
BeanInfo class.
Legal Notices