Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add a TableItem to a Table managed by TableViewer
How to add a TableItem to a Table managed by TableViewer [message #294252] Tue, 08 November 2005 01:29 Go to next message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
Hi,

I have a TableViewer (more precisely a CheckboxTableViewer) with 3
columns and the cells in the columns are associated with CellEditors.

I see that TableViewer.doUpdateItem(...) will nicely add a TableItem
with my cell model so that the content and label provider can be called.
But, doUpdateItem(...) is a protected method and CheckboxTableViewer()
is not meant to be sub-classed! What can I do to add a new item into
the table WITHOUT doing a TableViewer.setInput()?????

Thanks!
Re: How to add a TableItem to a Table managed by TableViewer [message #294264 is a reply to message #294252] Tue, 08 November 2005 13:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnny.xxxxxxxxx.com

AL wrote:

> Hi,

> I have a TableViewer (more precisely a CheckboxTableViewer) with 3
> columns and the cells in the columns are associated with CellEditors.

> I see that TableViewer.doUpdateItem(...) will nicely add a TableItem
> with my cell model so that the content and label provider can be called.
> But, doUpdateItem(...) is a protected method and CheckboxTableViewer()
> is not meant to be sub-classed! What can I do to add a new item into
> the table WITHOUT doing a TableViewer.setInput()?????

> Thanks!Hi,

Seems like the answer to the question is that you should call the add
method on the tree viewer. If you want to refresh an item then the refresh
method should do the trick. With the refresh method you can refresh the
specific item that has changed or you can refresh the whole table.
Re: How to add a TableItem to a Table managed by TableViewer [message #294281 is a reply to message #294264] Tue, 08 November 2005 18:57 Go to previous message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
Thanks! TableViewer.add() call does work!

Johnny wrote:

> AL wrote:
>
>> Hi,
>
>
>> I have a TableViewer (more precisely a CheckboxTableViewer) with 3
>> columns and the cells in the columns are associated with CellEditors.
>
>
>> I see that TableViewer.doUpdateItem(...) will nicely add a TableItem
>> with my cell model so that the content and label provider can be
>> called. But, doUpdateItem(...) is a protected method and
>> CheckboxTableViewer() is not meant to be sub-classed! What can I do
>> to add a new item into the table WITHOUT doing a
>> TableViewer.setInput()?????
>
>
>> Thanks!Hi,
>
>
> Seems like the answer to the question is that you should call the add
> method on the tree viewer. If you want to refresh an item then the
> refresh method should do the trick. With the refresh method you can
> refresh the specific item that has changed or you can refresh the whole
> table.
Previous Topic:TableViewer: SelectionChanged-Event and Editor-Activation-Timing
Next Topic:IDocument and IReconciler - thread safety?
Goto Forum:
  


Current Time: Thu Jul 25 13:47:04 GMT 2024

Powered by FUDForum. Page generated in 0.03194 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top