home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-09-10 | 647 b | 27 lines |
-
- package sunw.demo.molecule;
-
- /**
- * BeanInfo for a molecule. We simply expose a single property
- * the molecule name, with a custome proeprty editor.
- */
-
- import java.beans.*;
-
- public class MoleculeBeanInfo extends SimpleBeanInfo {
-
- public PropertyDescriptor[] getPropertyDescriptors() {
- try {
- PropertyDescriptor pd = new PropertyDescriptor("moleculeName",
- Molecule.class);
- pd.setPropertyEditorClass(MoleculeNameEditor.class);
- PropertyDescriptor result[] = { pd };
- return result;
- } catch (Exception ex) {
- System.err.println("MoleculeBeanInfo: unexpected exeption: " + ex);
- return null;
- }
- }
-
- }
-