BeanInfo reference

Created by Stefan Rennick Egglestone 2005-11-16
Last updated by Chris Greenhalgh 2005-11-28

Introduction
Using the BeanDescriptor
Using PropertyDescriptors
Supplying an icon

Introduction

The provision of one BeanInfo class per component is one method which can be used to indicate to ECT the existence of that component. For more information, see the Component Development Guide. BeanInfo classes can either be auto-generated from a component class, or can be manually constructed by a developer. This reference guide is intended for those who wish to use this latter method, and describes the information about a component that can be specified in a BeanInfo class.

Using the BeanDescriptor

Classes which implement the BeanInfo interface must provide a method which can return a java.beans.BeanDescriptor) object which describes the bean. Information included in a generic bean descriptor includes:
BeanInfo classes representing components should use these properties and attributes as following:
See Component documentation guide for more information about how some of these properties and attributes are used by ECT.

Using PropertyDescriptors

Each component property is described by a Property Descriptor (java.beans.PropertyDescriptor). This identifies the properties "external" name, its set and get methods (normally both, or just a get method for read-only properties) and the property's type (java class, normally automatically determined). Property descriptors can contain additional information which may be used by ECT. In particular

Supplying an Icon

A Bean Info can provide an icon for its bean, in one or more combinations of 16x16 or 32x32 and mono or colour. 16x16 colour is recommended as a minimum, with a transparent background.