|
Re: PropertyEditor [message #89730 is a reply to message #89652] |
Wed, 04 May 2005 15:33 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If the editor is an Eclipse editor, then you need to use an override
file, if it is a standard Java BeanInfo editor using standard BeanInfo
API, then it can be in the BeanInfo class.
Elena wrote:
> 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;
> }
>
>
--
Thanks,
Rich Kulp
|
|
|
|
Re: PropertyEditor [message #607338 is a reply to message #89652] |
Wed, 04 May 2005 15:33 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If the editor is an Eclipse editor, then you need to use an override
file, if it is a standard Java BeanInfo editor using standard BeanInfo
API, then it can be in the BeanInfo class.
Elena wrote:
> 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;
> }
>
>
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds