PropertyEditor [message #607333] |
Wed, 04 May 2005 10:43 |
Eclipse User |
|
|
|
Hello,
I would like to have an editor for a property of my class. Do I have to
use an override (.xmi) file as in your tutorial?
Or it is enough to say the VE in the class beaninfo to use my editor as in
my example below?
Thank you in advance
Elena
------------------------------------------------------------ -----
public PropertyDescriptor[] getPropertyDescriptors()
{
PropertyDescriptor[] props =
{
property("Test", "This is a test for my property editor") };
props[0].setPropertyEditorClass(TestEditor.class);
}
return props;
}
public static PropertyDescriptor property(String name, String description)
throws IntrospectionException
{
PropertyDescriptor p = new PropertyDescriptor(name,
ResourceProperties.class);
p.setShortDescription(description);
return p;
}
|
|
|
Powered by
FUDForum. Page generated in 0.04198 seconds