Implement IPropertySource with array property [message #155726] |
Tue, 26 October 2004 11:16  |
Eclipse User |
|
|
|
Originally posted by: bandrews.nospam_bphnx.com
Hi,
I understand how to implement an IPropertySource for a complex type such
as Point or Dim, but I am stuck on how to do this for an array. Actually a
Hashtable<String,String>. If someone could give me a hint to help my
simple mind grasp this concept, I would greatly appreciate it.
thanks,
B
|
|
|
Re: Implement IPropertySource with array property [message #155735 is a reply to message #155726] |
Tue, 26 October 2004 11:27   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Wrap the table in another propertysource object. So, create a descriptor
for the hashtable, but that descriptor doesn't need to allow editing or
provide a cell editor. The user will expand the source in the
propertysheet.
Then, in your propertysource implementation, implement getDescriptors() to
just return objects wrapping all of the keys in the table. getValue will
lookup the values in the table.
The propertysheet will call setPropertyValue() bottom-up. You can safely
ignore the setting of the hashtable back into the original source of the
table, but you do need to make sure you fire notification.
Finally, you probably could use a celleditor on the table itself to popup a
dialog which allows the creation of a new key+value pair.
"bandrews" <bandrews@nospam_bphnx.com> wrote in message
news:cllpo1$g37$1@eclipse.org...
> Hi,
> I understand how to implement an IPropertySource for a complex type such
> as Point or Dim, but I am stuck on how to do this for an array. Actually a
> Hashtable<String,String>. If someone could give me a hint to help my
> simple mind grasp this concept, I would greatly appreciate it.
>
>
> thanks,
>
> B
>
|
|
|
Re: Implement IPropertySource with array property [message #155741 is a reply to message #155735] |
Tue, 26 October 2004 11:37  |
Eclipse User |
|
|
|
Originally posted by: bandrews.nospam_bphnx.com
Very clear! Thanks a lot!!
Randy Hudson wrote:
> Wrap the table in another propertysource object. So, create a descriptor
> for the hashtable, but that descriptor doesn't need to allow editing or
> provide a cell editor. The user will expand the source in the
> propertysheet.
> Then, in your propertysource implementation, implement getDescriptors() to
> just return objects wrapping all of the keys in the table. getValue will
> lookup the values in the table.
> The propertysheet will call setPropertyValue() bottom-up. You can safely
> ignore the setting of the hashtable back into the original source of the
> table, but you do need to make sure you fire notification.
> Finally, you probably could use a celleditor on the table itself to popup a
> dialog which allows the creation of a new key+value pair.
> "bandrews" <bandrews@nospam_bphnx.com> wrote in message
> news:cllpo1$g37$1@eclipse.org...
> > Hi,
> > I understand how to implement an IPropertySource for a complex type such
> > as Point or Dim, but I am stuck on how to do this for an array. Actually a
> > Hashtable<String,String>. If someone could give me a hint to help my
> > simple mind grasp this concept, I would greatly appreciate it.
> >
> >
> > thanks,
> >
> > B
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03770 seconds