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 Properties node in the left panel contains bean properties that conform to the JavaBeans specification. The properties in the right panel reflect characteristics and settings of objects in the IDE. Thus, in the BeanInfo Editor dialog box, you can set properties of bean properties themselves.
When the Bean Info node is selected, the first four properties in the property sheet panel enable you to designate icons for the bean by entering the relative path to and names of graphic files.
The next two properties, Default Property Index and Default Event Index,
are the indexes of the default property and event in the
PropertyDescriptor
and EventSetDescriptor
arrays, respectively. Set the value
to -1 if there is no default property or event.
For information about these JavaBeans elements, see "BeanInfo"
in the API documentation that comes with your Java 2 SDK, or see Sun's
web site at
http://java.sun.com/products/jdk/1.3/docs/api/java/beans/BeanInfo.html
.
(Replace 1.3
in the above URL with 1.2
if you are
using JDK version 1.2.)
If you right-click on any of these nodes, you can choose to include or exclude all of the properties, event sources, or methods from the BeanInfo.
The subnodes represent the bean properties, events, and methods themselves. The most important property for each subnode is Include in BeanInfo, which is set to true by default. If you set this property to false, the JavaBeans property, event, or method is not shown to users or other classes.
When Include in BeanInfo is true, a green square with a white check mark appears next to the subnode. When Include in BeanInfo is false, a red square with a white X appears next to the subnode. Other node icons in the BeanInfo Editor have the same meaning that they do in the Explorer or Object Browser, as described in Node Icons in the Explorer and the Object Browser.
Two properties of each bean property subnode--Expert and Preferred--are used to determine how the bean property is displayed in an IDE. If you reuse the bean in this IDE, these property settings determine how the bean properties are displayed in the Component Inspector as follows:
![]() |
If you want to set a property in the right panel to the same value for multiple JavaBeans properties, events, or methods, you can use the Shift key to select several nodes and then set the properties for all of them at once. |
See also | |
---|---|
Generating BeanInfo
Creating a Bean Component Inspector |