borland Packages Class Hierarchy jb.util Package
java.lang.Object +----com.borland.jb.util.BasicBeanInfo +----com.borland.datastore.DataStoreBeanInfo +----com.borland.datastore.DataStoreConnectionBeanInfo +----com.borland.datastore.TxManagerBeanInfo +----com.borland.datastore.jdbc.DataStoreServerBeanInfo +----com.borland.dx.dataset.ColumnBeanInfo +----com.borland.dx.dataset.DataSetViewBeanInfo +----com.borland.dx.dataset.ParameterRowBeanInfo +----com.borland.dx.dataset.StorageDataSetBeanInfo +----com.borland.dx.dataset.TextDataFileBeanInfo +----com.borland.dx.sql.dataset.DatabaseBeanInfo +----com.borland.dx.sql.dataset.ProcedureResolverBeanInfo +----com.borland.dx.sql.dataset.QueryResolverBeanInfo
Variables Properties Methods
Implements BeanInfo
A convenient implementation of the java.beans.BeanInfo interface, designed to be subclassed to fill in appropriate properties, methods, and events for a JavaBean. Extend BasicBeanInfo when you want to provide explicit information about your component rather than have JBuilder and other such tools derive the information through introspection.
protected BeanInfo[]additionalBeanInfoAn array of other other bean information objects.
protected Class beanClassThe JavaBean component class. A subclassed bean information class must specify a component class, which is the only required field.
public static final String CONTAINER_DELEGATE = "containerDelegate"A Bean descriptor key value used to inform a designer that the add calls and layout setting should not be applied directly to the component, but should call this method first.
The method is assumed to take no parameters. javax.swing.JFrame contains the following example:
setValue("containerDelegate","getContentPane");
protected Class customizerClassThe customizer class for this JavaBean, if one exists.
protected int defaultEventIndexThe index of the default event for your JavaBean. The index identifies the event in the set of event descriptors described held in the array of the the eventSetDescriptors property. An index value of -1 means there is no default event.
protected int defaultPropertyIndexThe index of the default property for your JavaBean. The index identifies the property in the set of property descriptors held in the array of the the propertyDescriptors property. An index value of -1 means there is no default property.
public static final String ENUMERATION = "enumerationValues"A property descriptor key value that will cause a tag list property editor to be associated with this property.
The value for this key should be an Object array with three values for each entry desired in the tag list. The first value in each set is the text that will appear in the tag list, the next value is the live value and the third value is the java Initialization String.
protected String[][]eventListenerMethodsThe names of each event set's listener methods. Specify the names using this format:
{{"listener1Method1", "listener1Method2", "listener1Method3", ...}, ...}
{{"actionPerformed"}, ...}
protected String[][]eventSetDescriptorsThe event information for your JavaBean. Specify the event information using this format:
{{"EventSetName", "EventListenerClass", "AddMethod", "RemoveMethod"}, ...}
{{"ActionListener", "java.awt.event.ActionListener", "addActionListener", "removeActionListener"}, ...}
protected Image iconColor16x16A 16x16 pixel color icon for your JavaBean. If none is specified, one will be searched for using a default resource name.
protected Image iconColor32x32A 32x32 pixel color icon for your JavaBean.
protected Image iconMono16x16A 16x16 pixel monochromatic icon for your JavaBean. If none is specified, one will be searched for using a default resource name.
protected Image iconMono32x32A 32x32 pixel monochromatic icon for your JavaBean. If none is specified, one will be searched for using a default resource name.
public static final String IS_CONTAINER = "isContainer"A Bean descriptor key value used to inform a designer that although the bean extends java.awt.Container it should not be treated as one. The value should be false.
When not present, beans that extend java.awt.Container are treated as a containers.
public static final String LATE_SETTING = "lateSetting"A property descriptor key value that operates as a hint to the designer that this property setting should come near the end (after the add calls). The value should be set to true.
When not present, this variable is assumed to be false.
protected String[]methodNamesThe method names for your JavaBean. Don't include the access methods for properties. Specify the method names using this format:
{"method1", "method2", "method3", ...}
{"fillRect", "eraseRect", "close", "open"}
protected String[][]methodParametersThe method parameters for each of your JavaBean's methods. Specify the parameters using this format:
{{"method1Parameter1", "method1Parameter2", ...}, ...}
{{"java.awt.Graphics", "java.awt.Rectangle", ...}, ...}
protected Object[][]namedAttributesAny additional named attributes for the JavaBean. Specify the attributes using this format:
{{"AttributeName", AttributeSetting}, ...}
{{"isContainer", Boolean.TRUE}, {"containerDelegate", "getContentPane"}, ...}
protected Object[][]propertyDescriptorAttributesAdditional attributes for each property described in the propertyDescriptors array. Entries in the propertyDescriptorAttributes array and the propertyDescriptors array are matched by an index position in each array. Use a null value as a placeholder for property entries without attributes. The propertyDescriptorAttributes array need not be the same size as the propertyDescriptors array.
Specify the attributes using this format:
{{"AttributeName", "AttributeValueAsString"}, ...}
{null, {"enumerationValues", "LEFT, 2, SwingConstants.LEFT, CENTER, 0, SwingConstants.CENTER"},}
protected String[][]propertyDescriptorsThe property information for your JavaBean. Null parameters are ignored, with the exception of GetterMethodName and SetterMethodName for which a null value (not "") indicates the property should be write-only or read-only, respectively.
Setting both the GetterMethodName and SetterMethodName to the empty string ("") indicates that the standard Java property naming rules should be applied to determine the getter and setter names from the property name.
The first four entries are required; use null as a placeholder to ignore properties. If the SetterMethodParamType entry is non-null, it will be used to find the actual setter method with that parameter type, rather than letting java.beans.PropertyDescriptor find it. To specify a primitive type as the parameter type, append ".class" to the end of the primitive type name. Specify the property information using this format:
{{"PropertyName", "Short Description", "GetterMethodName", "SetterMethodName", "PropertyEditor", "Expert", "Hidden", "SetterMethodParamType"}, ...} Example: {{"text", "Control Text", "getText", "setText", "mypackage.MyPropertyEditor", "true", "false", "java.lang.String"}, ...}
{{"eigenvalue", "Complex property", "", "", null, "true", "true", "int.class"}, ...}
public BeanInfo[]getAdditionalBeanInfo()Returns the array of bean information objects for this JavaBean.
public BeanDescriptor getBeanDescriptor()Returns the bean descriptor associated with this JavaBean.
public int getDefaultEventIndex()Returns the default event index for this JavaBean. The index returned locates the event in the eventSetDescriptors array. An index value of -1 means there is no default event for this bean.
public int getDefaultPropertyIndex()Returns the default property index for this JavaBean. The index returned locates the property in the propertyDescriptors array. An index value of -1 means there is no default property for this bean.
public EventSetDescriptor[]getEventSetDescriptors()Returns the array of event set descriptors for this JavaBean.
public MethodDescriptor[]getMethodDescriptors()Returns the array of method descriptors for this JavaBean.
public PropertyDescriptor[]getPropertyDescriptors()Returns the array of property descriptors for this JavaBean.
protected String getDefaultIconResource(int iconKind)Returns the default resource to use to find an icon for a JavaBean.
If an icon is requested, and not explicitly set in the subclass of BasicBeanInfo, an icon is searched for using a simple look-up using the beanClass's name and the requested icon type.
Following is a simple chart describing the default resource locations using an example of the JavaBean class package1.package2.MyBean:
public Image getImage(String resource)This is a simple utility function that retrieves an Image object from a resource. The resource must by specified as a relative path to the beanClass resource.