why not display a combox selector in property sheet? [message #613473] |
Fri, 07 July 2006 02:02 |
Eclipse User |
|
|
|
Originally posted by: xubin.wei.ellingtonpcb.com
hi all:
when i add a control to ve.I write the code as blew in the beaninfo, but
do not display a combox selector in property sheet, why?
public class SimplemodelBeanInfo extends SimpleBeanInfo {
....................
public PropertyDescriptor[] getPropertyDescriptors() {
try {
PropertyDescriptor[] result = new PropertyDescriptor[3];
result[0] = new PropertyDescriptor("TextA", Simplemodel.class);
result[1] = new PropertyDescriptor("TextB", Simplemodel.class);
result[2] = new PropertyDescriptor("type", Simplemodel.class);
result[2].setValue("enumerationValues" ,new Object[] {
"Dots", new Integer(Simplemodel.DOTS),
"com.cy.controls.widget.Simplemodel.DOTS",
"More", new Integer(Simplemodel.MORE),
"com.cy.controls.widget.Simplemodel.MORE",
"Open", new Integer(Simplemodel.OPEN),
"com.cy.controls.widget.Simplemodel.OPEN"
});
return result;
} catch (IntrospectionException e) {
e.printStackTrace();
return null;
}
}
thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03555 seconds