Java Glossary : BeanInfo

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : B words : BeanInfo.

BeanInfo
A BeanInfo class describes the properties of a JavaBean, and provides an icon forit. Writing a BeanInfo is pretty easy. See this example heavily-commented Date_CABeanInfo java source code.


view

In the comments are hidden many useful hints. Studying the example code in the BeanBox is more helpful than reading the JavaBean spec. For example, study the MoleculeEditor to provide a list of allowable choices fora String property. For more complex PropertyEditors based on implementing the java.beans.PropertyEditor interface or extending the PropertyEditorSupport class
The key thing to understand is that there is no glue between the JavaBean and the BeanInfo class other than the naming convention. If your Bean is called Jim then the corresponding BeanInfo class has to be called JimBeanInfo and has to be stored in the same directory. There is glue in the other direction, via the bean's BeanClass passed to the various PropertyDescriptor constructors in the BeanInfo code. Normally JavaBeans and their corresponding BeanInfo classes are bundled up together with other beans and dependent classes in a jar file.

BDK: Bean Development Kit ¤ BeanBox ¤ Jar File ¤ JavaBean ¤ Manifest


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 1054.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/beaninfo.html J:\mindprod\jgloss\beaninfo.html