Skip to main content



      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] Mon, 07 November 2005 20:29 Go to next message
Eclipse UserFriend
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 08: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 13:57 Go to previous message
Eclipse UserFriend
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: Sat May 10 12:12:56 EDT 2025

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

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

Back to the top