try {
PropertyDescriptor _background = new PropertyDescriptor("background", beanClass, "getBackground", "setBackground");
_background.setDisplayName("background");
_background.setShortDescription("background");
PropertyDescriptor _font = new PropertyDescriptor("font", beanClass, "getFont", "setFont");
_font.setDisplayName("font");
_font.setShortDescription("font");
PropertyDescriptor _fontColor = new PropertyDescriptor("fontColor", beanClass, "getFontColor", "setFontColor");
_fontColor.setDisplayName("color for font");
_fontColor.setShortDescription("font color");
PropertyDescriptor _style = new PropertyDescriptor("style", beanClass, "getStyle", "setStyle");
_style.setDisplayName("style");
_style.setShortDescription("style");
// enumeration mechanism added to the Beans spec. Format is a simple array
// of objects in triplet sets. First item is the string to display in the
// IDE (each mfr has to decide how they want to do it). The second item is
// the value of the object (typically an Integer) and the third is the
// code-gen string. This mechanism really makes code more readable when
// created by a bean-aware RAD tool. Instead of seeing
// x.setStyle(2);
// you would see
// x.setStyle(DateBean.YEAR_MONTH_DAY);
// in your code. The latter matching what many developers already do to
// make their code more readible
_style.setValue("enumerationValues", new Object[] {
"Mon Day Year", new Integer(DateBean.MONTH_DAY_YEAR), "DateBean.MONTH_DAY_YEAR",
"Mon Day Year Era", new Integer(DateBean.MONTH_DAY_YEAR_ERA), "DateBean.MONTH_DAY_YEAR_ERA",
"Year Mon Day", new Integer(DateBean.YEAR_MONTH_DAY), "DateBean.YEAR_MONTH_DAY",
"Mon Year", new Integer(DateBean.MONTH_YEAR), "DateBean.MONTH_YEAR",
"Day Mon Year", new Integer(DateBean.DAY_MONTH_YEAR), "DateBean.DAY_MONTH_YEAR"
});
PropertyDescriptor _useMonthString = new PropertyDescriptor("useMonthString", beanClass, "getUseMonthString", "setUseMonthString");
_useMonthString.setDisplayName("use month string");
_useMonthString.setShortDescription("month string");
PropertyDescriptor[] pds = new PropertyDescriptor[] {
_background,
_font,
_fontColor,
_style,
_useMonthString
};
return pds;
}
catch (IntrospectionException ex) {
ex.printStackTrace();
return null;
}