overriding property handling globally [message #126264] |
Thu, 15 June 2006 15:06  |
Eclipse User |
|
|
|
Is it possible to override property editing for all widgets?
What I want is to supply special handling for the "model" property of
all widgets. If I don't have any special handling available for the
particular widget, I want to delegate to the default handling.
|
|
|
|
Re: overriding property handling globally [message #126326 is a reply to message #126278] |
Fri, 16 June 2006 09:17  |
Eclipse User |
|
|
|
Jeff,
What I really want to do is to allow my users to assign the model
property of arbitrary widgets (if I have a connection that can be made).
So if they've dropped a JList, I want to discover that and allow them
to select from any data sources that I know about that are adaptable to
a ListModel. However, if the argument to setModel is not relevant to
me, then I would just let the default property editing take place.
What I have kind of working at the moment is a context menu item that
gets added to widgets. When the user invokes the context menu for a
JList object, I decide what sort of hookup (if any) is available.
I'm just trying to see if it's possible to get that same behavior in the
property sheet.
Thanks,
-Ernest
Jeff Myers wrote:
> Ernest,
>
> If your widgets have a common base class with the model property, you
> should be able to specify the property editor in an override on that
> class, then override the override on subclasses when necessary.
>
> Hope this helps,
> - Jeff
|
|
|
Re: overriding property handling globally [message #613353 is a reply to message #126264] |
Thu, 15 June 2006 16:38  |
Eclipse User |
|
|
|
Ernest,
If your widgets have a common base class with the model property, you
should be able to specify the property editor in an override on that
class, then override the override on subclasses when necessary.
Hope this helps,
- Jeff
|
|
|
Re: overriding property handling globally [message #613357 is a reply to message #126278] |
Fri, 16 June 2006 09:17  |
Eclipse User |
|
|
|
Jeff,
What I really want to do is to allow my users to assign the model
property of arbitrary widgets (if I have a connection that can be made).
So if they've dropped a JList, I want to discover that and allow them
to select from any data sources that I know about that are adaptable to
a ListModel. However, if the argument to setModel is not relevant to
me, then I would just let the default property editing take place.
What I have kind of working at the moment is a context menu item that
gets added to widgets. When the user invokes the context menu for a
JList object, I decide what sort of hookup (if any) is available.
I'm just trying to see if it's possible to get that same behavior in the
property sheet.
Thanks,
-Ernest
Jeff Myers wrote:
> Ernest,
>
> If your widgets have a common base class with the model property, you
> should be able to specify the property editor in an override on that
> class, then override the override on subclasses when necessary.
>
> Hope this helps,
> - Jeff
|
|
|
Powered by
FUDForum. Page generated in 0.07608 seconds