Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Virtual tableViewer
Virtual tableViewer [message #659006] Thu, 10 March 2011 16:36 Go to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi guys,

I have a question about virtual TableViewers. What's the difference between using just the TableViewer with style SWT.VIRTUAL and using the TableViewer with style SWT.VIRTUAL and the ILazyContentProvider?

I don't understand it. From my point of view is using SWT.VIRTUAL without the ILazyContentProvider useless. Is that true?
Re: Virtual tableViewer [message #659024 is a reply to message #659006] Thu, 10 March 2011 17:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No it is not true. If your bottleneck is not the loading of items from
your datasource e.g. because it is a localstorage, you already have the
data in memory, ... SWT.VIRTUAL helps maybe because the SWT-Control does
not have to create all SWT-TableItems at once.

The important difference is also that if you use
ViewerFilter/ViewerComparator they only work with an ordinary content
provider.

Tom

Am 10.03.11 17:36, schrieb Behnil:
> Hi guys,
>
> I have a question about virtual TableViewers. What's the difference
> between using just the TableViewer with style SWT.VIRTUAL and using the
> TableViewer with style SWT.VIRTUAL and the ILazyContentProvider?
>
> I don't understand it. From my point of view is using SWT.VIRTUAL
> without the ILazyContentProvider useless. Is that true?
Re: Virtual tableViewer [message #659141 is a reply to message #659024] Fri, 11 March 2011 09:15 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Aaaaa...so:

if I have my whole model in memory, I can still use the SWT.VIRTUAL flag to avoid TableViewer creating all TableItems at once, which speed up creating the table. And I can still use sorting and filtering.

But when is bottleneck loading the model, I need to use ILazyContentProvider, because it can provide one model abject after another when it's needed (scrolling down). But I can't use sorting and filtering.

There is one thing I still don't understand. Why isn't every TableViewer virtual? What are the disadvantages of it?
Re: Virtual tableViewer [message #1425741 is a reply to message #659141] Wed, 17 September 2014 19:34 Go to previous message
Artyom Karalov is currently offline Artyom KaralovFriend
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
Working with virtual table is a little bit more complicated, thus you have an option to decide whether you need it or not.
Previous Topic:tableviewer header heigth
Next Topic:TreeViewer Collapses on refresh
Goto Forum:
  


Current Time: Wed Apr 24 17:49:05 GMT 2024

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

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

Back to the top