BeanInfo is interface information for programs that use Beans as components. Use BeanInfo definition to define BeanInfo information. Open a Bean file and select [Edit] > [Define BeanInfo] > [BeanInfo Definition] from the workbench menu bar to invoke BeanInfo definition.
Point
The BeanInfo definition menu will only be enabled if the Java editor of the Bean file is focused. Open the menu after checking that the focus is on the editor.
Defining BeanInfo includes the following:
Defining properties
To add Bean properties, enter information using the [Add Property] dialog box that is displayed by clicking [Add Property].
Definition fields
Bean properties include the following special information:
Item | Description |
---|---|
Edit class name | Specify the dedicated class name for editing properties, with the package name attached. The edit class name can be omitted. |
Invisible for internal use | Select this to make a property that cannot be used by ordinary users. |
The feature for the expert | Select this to make a property that is for experts. |
Attribute information | Allows a simple description of the property to be described |
Point
[Invisible for Internal use], [The feature for the expert], and [Attribute information] are common to each definition field of a property, method, and event.
Defining a method
To enable a method, select the method name in the tree display area and then click [Enable]. To make the method of an extending class the method of a Bean, give [Show Public Methods of Extended Classes] a selected status, select the method name of the extending class in the tree display area, and then click [Enable].
To disable a method of a Bean, select the method name in the tree display area and then click [Disable].
Defining an event
To add a Bean event, click [Add Event]. Enter the required information in the [Add Event] dialog box that is always displayed and then click [OK].
To make a superclass event a Bean event, select an event name from the tree display area and then click [Enable].
To disable a Bean event, select the event name from the tree display area and then click [Disable].
When generating event object classes and event listener interface source, select [Edit] > [Define BeanInfo] > [Generate event source] from the workbench menu bar. Edit the generated source just as you would normal Java source in a Java editor.
Note
The properties, methods, and events generated using BeanInfo definitions remain in the source even if they are disabled. Delete with a Java editor to delete them from the source.