1 | public class AliasGroupBeanInfo extends SimpleBeanInfo↵ | | 1 | public class DimensionWrapperBeanInfo extends SimpleBeanInfo↵
|
2 | {↵ | | 2 | {↵
|
3 | private static interface IPropertyNames extends AliasGroup.IPropertyNames↵ | | |
|
4 | {↵ | | |
|
5 | // Empty body.↵ | | |
|
6 | }↵ | | |
|
|
7 | /**↵ | | 3 | /**↵
|
8 | * See http://tinyurl.com/63no6t for discussion of the proper thread-safe way to implement↵ | | 4 | * See http://tinyurl.com/63no6t for discussion of the proper thread-safe way to implement↵
|
9 | * getPropertyDescriptors().↵ | | 5 | * getPropertyDescriptors().↵
|
10 | * ↵ | | 6 | * ↵
|
11 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵ | | 7 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵
|
12 | */↵ | | 8 | */↵
|
13 | @Override↵ | | 9 | @Override↵
|
14 | public PropertyDescriptor[] getPropertyDescriptors()↵ | | 10 | public PropertyDescriptor[] getPropertyDescriptors()↵
|
15 | {↵ | | 11 | {↵
|
16 | try↵ | | 12 | try↵
|
17 | {↵ | | 13 | {↵
|
18 | PropertyDescriptor[] result = new PropertyDescriptor[2];↵ | | 14 | PropertyDescriptor[] result = new PropertyDescriptor[2];↵
|
19 | result[0] =↵ | | 15 | result[0] =↵
|
20 | new PropertyDescriptor(IPropertyNames.ID, AliasGroup.class, "getIdentifier", "setIdentifier↵ | | 16 | new PropertyDescriptor(DimensionWrapper.IPropertyNames.WIDTH, DimensionWrapper.class, "getWidth",↵
|
21 | ");↵ | | 17 | "setWidth");↵
|
22 | result[0] = ↵ | | 18 | result[1] =↵
|
23 | new PropertyDescriptor(IPropertyNames.NAME, AliasGroup.class, "getName↵ | | 19 | new PropertyDescriptor(DimensionWrapper.IPropertyNames.HEIGHT, DimensionWrapper.class,↵
|
24 | ", "setName");↵ | | 20 | "getHeight", "setHeight");↵
|
25 | return result;↵ | | 21 | return result;↵
|
26 | }↵ | | 22 | }↵
|
27 | catch (IntrospectionException e)↵ | | 23 | catch (IntrospectionException e)↵
|
28 | {↵ | | 24 | {↵
|
29 | throw new Error(e) | | 25 | throw new Error(e)
|