|
|
Re: Extending Item? [message #462172 is a reply to message #462143] |
Fri, 07 October 2005 14:02 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
At the very top of the javadoc for table item it says:
* </dl>
* <p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
* </p>
*/
So no, it should not be subclassed.
However there is a Widget.setData (String key, Object value) method
where you can store additional data and then you can have listeners that
take the additional data and do things.
Robert Bacs wrote:
> Hi Brad,
>
> I've made my own custom Table control too, so there should be no problem,
> and you can extend the Item class to create your own custom table items.
> Also you can make your own viewer for the custom table extending from
> StructuredViewer.
>
> Regards,
> Boby
>
> "Brad Reynolds" <bradleyjames@gmail.com> wrote in message
> news:di4ocd$76f$1@news.eclipse.org...
>
>>I have a custom Table that mimics the SWT API to a certain extent. I'm
>>working on the viewer for it and StructuredViewer expects a Widget to be
>>passed to a few methods. I made my TableItem extend Item to get past
>>this and I just want to make sure that I'm not doing something that is
>>going to cause me problems. Composite and Canvas are the only widgets
>>that I know I should extend but didn't know if that applied to non
>>Controls (also the javaodc for Item doesn't say not to extend it).
>>Everything seems alright from a functionality perspective but I wanted
>>to check to make sure that I'm not going to run into issues. Is this
>>alright to do? Does anyone see any potential problems?
>>
>>Thanks,
>>Brad
>
>
>
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.03042 seconds