Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TableViewer with SWT.CHECK
TableViewer with SWT.CHECK [message #29596] Fri, 01 June 2007 08:54 Go to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
I created a new TableViewer with styles SWT.CHECK and SWT.MULTI. Displaying
the table works fine. The question is how can I retrieve the checked table
rows?

TableViewer#getSelection only returns selected but not checked items. Any
idea?
Stefan.
Re: TableViewer with SWT.CHECK [message #30052 is a reply to message #29596] Fri, 01 June 2007 10:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Stefan,

each TableItem has a getChecked() method to read its checked state. The
SelectionEvent fired by the Table will inform you about changes. The
detail field is set to SWT.CHECK in this case.
You can find more information in the JavaDoc.

Hope that helps,
Rüdiger

Stefan Röck wrote:
> I created a new TableViewer with styles SWT.CHECK and SWT.MULTI. Displaying
> the table works fine. The question is how can I retrieve the checked table
> rows?
>
> TableViewer#getSelection only returns selected but not checked items. Any
> idea?
> Stefan.
>
>
Re: TableViewer with SWT.CHECK [message #30265 is a reply to message #30052] Fri, 01 June 2007 13:32 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hallo R
Re: TableViewer with SWT.CHECK [message #30479 is a reply to message #30265] Fri, 01 June 2007 17:46 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Stefan,

as long as you don't add a SelectionListener there are not extra
rountrips. The state is kept in the TableItem in any case. Thus
iterating over all items and asking getChecked() will give you the
current checked state.

Cheers,
Rüdiger

Stefan Röck wrote:
> Hallo Rüdiger,
>
> but this means that everytime the user checks/unchecks an item a
> serverroundtrip is performed and I have to keep the state in my application
> logic, correct? If so, although in SWT this might be a practical solution,
> one might run into serious performance issues in RAP (there is a similar
> problem with VerifyListeners, for instance).
>
> Can you think of a more server-friendly RAP-specific solution (e.g. offering
> a method TableViewer#getCheckedItems())?
>
> Regards,
> Stefan.
>
> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
> news:f3or4g$i3c$1@build.eclipse.org...
>> Stefan,
>>
>> each TableItem has a getChecked() method to read its checked state. The
>> SelectionEvent fired by the Table will inform you about changes. The
>> detail field is set to SWT.CHECK in this case.
>> You can find more information in the JavaDoc.
>>
>> Hope that helps,
>> Rüdiger
>>
>> Stefan Röck wrote:
>>> I created a new TableViewer with styles SWT.CHECK and SWT.MULTI.
>>> Displaying the table works fine. The question is how can I retrieve the
>>> checked table rows?
>>>
>>> TableViewer#getSelection only returns selected but not checked items. Any
>>> idea?
>>> Stefan.
>
>
Previous Topic:Plugin Development Question
Next Topic:Problem with osgi console
Goto Forum:
  


Current Time: Thu Apr 25 21:16:11 GMT 2024

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

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

Back to the top