@Target(value=TYPE) @Retention(value=RUNTIME) public @interface BeanInfo
BeanInfo class and its BeanDescriptor.
 
 JFormDesigner first uses Introspector.getBeanInfo(Class)
 to construct a BeanInfo and then applies changes specified
 in annotations to copies of the BeanInfo,
 BeanDescriptor and PropertyDescriptors.
 
Example:
 @BeanInfo(
     description="My Bean",
     icon="MyBean.gif",
     properties={
         @PropertyDesc(name="magnitude", displayName="magnitude (in %)", preferred=true)
         @PropertyDesc(name="enabled", expert=true)
     },
     categories={
         @Category(name="Sizes", properties={"preferredSize", "minimumSize", "maximumSize"}),
         @Category(name="Colors", properties={"background", "foreground"}),
     }
 )
 public class MyBean extends JCompoment { ... }
 
 Example:
 
 @BeanInfo(isContainer=true,containerDelegate="getContentPane")
 public class MyPanel extends JPanel { ... }
 | Modifier and Type | Optional Element and Description | 
|---|---|
| BeanInfo.Attribute[] | attributesSpecifies additional named attributes for the  BeanDescriptor. | 
| BeanInfo.Category[] | categoriesSpecifies categories for grouping properties in the JFormDesigner Properties view. | 
| String | containerDelegateIf components should be added to a descendant of a container,
 then it is possible to specify a method that returns the container
 for the children. | 
| Class<? extends Customizer> | customizerSpecifies the bean's customizer. | 
| String | descriptionDescription of the JavaBean. | 
| String | iconResource name of a 16x16 color icon of the JavaBean. | 
| boolean | isContainerSpecifies whether a component is a container or not. | 
| String[] | persistenceConstructorPropertiesSpecifies the property names for a
  DefaultPersistenceDelegate(String[])used to persist an instance of the annotated class. | 
| Class<? extends PersistenceDelegate> | persistenceDelegateSpecifies the persistence delegate used to persist an instance of the annotated class. | 
| PropertyDesc[] | propertiesSpecifies property descriptors. | 
public abstract String description
Used in the JFormDesigner Palette to display descriptions of beans in tooltips.
public abstract String icon
 JFormDesigner uses beanClass.getResource(icon)
 to locate the icon file.
public abstract Class<? extends Customizer> customizer
Customizer and inherit from
 Component so it can be instantiated inside an dialog.public abstract boolean isContainer
public abstract String containerDelegate
JFrame.getContentPane()
 is an example for such a method.
 The value must be a String and specifies the name of a method
 that takes no parameters and returns a Container.public abstract PropertyDesc[] properties
PropertyDesc for details.
 Example:
 
 @BeanInfo(
     properties={
         @PropertyDesc(name="magnitude", displayName="magnitude (in %)", preferred=true),
         @PropertyDesc(name="enabled", expert=true)
     }
 )
 public class MyBean extends JCompoment { ... }
 
 This attribute can be used to modify property descriptors of super classes
 without overriding property getter or setter methods.public abstract BeanInfo.Category[] categories
BeanInfo.Category for details.public abstract String[] persistenceConstructorProperties
DefaultPersistenceDelegate(String[])
 used to persist an instance of the annotated class.
 The annotated class must have a constructor that accepts the given properties.
 Only necessary for classes that are not JavaBeans.
 Used by JFormDesigner to encode/decode the property value to XML.
Example:
 @BeanInfo(persistenceConstructorProperties={"value1", "value2"})
 public class MyImmutablePropertyData {
     private final String value1;
     private final String value2;
     public MyImmutablePropertyData( String value1, String value2 ) {
         this.value1 = value1;
         this.value2 = value2;
     }
     public String getValue1() { return value1; }
     public String getValue2() { return value2; }
 }
 public abstract Class<? extends PersistenceDelegate> persistenceDelegate
persistenceConstructorProperties() is specified, then this attribute is ignored.
 Used by JFormDesigner to encode/decode the property value to XML.
public abstract BeanInfo.Attribute[] attributes
BeanDescriptor.
 Invokes FeatureDescriptor.setValue(String, Object).
 See BeanInfo.Attribute for details.Copyright (C) 2004-2019 FormDev Software GmbH. All rights reserved.