Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Virtual Table
Virtual Table [message #455834] Thu, 19 May 2005 23:47 Go to next message
Avneesh Jain is currently offline Avneesh JainFriend
Messages: 11
Registered: July 2009
Junior Member
In case of virtual tables is it necessary to setItemCount() for it to work
properly? I have a case where item count is not know beforehand. If I dont
set item count, does it affect the scrollbar thumb size?

I also wanted to know if JFace TableViewer supports virtual tables (my guess
is no, but just want to confirm). Are there any plans of building that
support in near future?

Avneesh
Re: Virtual Table [message #455839 is a reply to message #455834] Fri, 20 May 2005 07:15 Go to previous messageGo to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Avneesh Jain wrote:
> In case of virtual tables is it necessary to setItemCount() for it to work
> properly?
I have a case where item count is not know beforehand. If I dont
> set item count, does it affect the scrollbar thumb size?

As far as i know setItemCount preallocates all TableItems and adjusts
the scollbar thumb size. Virtual Table is not designed to be used
without setItemcount. It may work or may not work.

> I also wanted to know if JFace TableViewer supports virtual tables (my guess
> is no, but just want to confirm). Are there any plans of building that
> support in near future?

It is supported in 3.1. You'll need an IlazyContentProvider and must(!)
call setItemCount on the TableViewer, setInput is not used for virtual
tables.
Re: Virtual Table [message #455848 is a reply to message #455839] Fri, 20 May 2005 10:40 Go to previous messageGo to next message
Stefano Zaccaria is currently offline Stefano ZaccariaFriend
Messages: 48
Registered: July 2009
Member
Well... OK! The JFace support the TableViewer with SWT.VIRTUAL, and you had
said that I'll need a IlazyContentProvider for use it, well... but how can
i use it, in other words where I found a example that use this type of
table? I've try to write a code but it not fuction very well... Can you help
me?

Thanks
Stefano

"Yves Harms" <user@domain.invalid> ha scritto nel messaggio
news:d6k2t5$rb8$1@news.eclipse.org...
> Avneesh Jain wrote:
>> In case of virtual tables is it necessary to setItemCount() for it to
>> work
>> properly?
> I have a case where item count is not know beforehand. If I dont
>> set item count, does it affect the scrollbar thumb size?
>
> As far as i know setItemCount preallocates all TableItems and adjusts the
> scollbar thumb size. Virtual Table is not designed to be used without
> setItemcount. It may work or may not work.
>
>> I also wanted to know if JFace TableViewer supports virtual tables (my
>> guess
>> is no, but just want to confirm). Are there any plans of building that
>> support in near future?
>
> It is supported in 3.1. You'll need an IlazyContentProvider and must(!)
> call setItemCount on the TableViewer, setInput is not used for virtual
> tables.
Re: Virtual Table [message #455911 is a reply to message #455848] Mon, 23 May 2005 12:08 Go to previous messageGo to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Step 1 - Get it working non-lazy first:

See this article to get an idea how it works non-lazy:
http://www.eclipse.org/articles/Article-Table-viewer/table_v iewer.html
Try to get your code working with that first. For further tips search
the swt newsgroup, there are already a couple of helpful threads.


Step 2 - now just some minor modifications and you're done:
Replace your call to the TableViewers setInput(...) with a call to
setItemCount.
Let you Contentprovider now implement ILazyContentProvider instead of
IStructuredContentProvider.

Thats it.



> Well... OK! The JFace support the TableViewer with SWT.VIRTUAL, and you had
> said that I'll need a IlazyContentProvider for use it, well... but how can
> i use it, in other words where I found a example that use this type of
> table? I've try to write a code but it not fuction very well... Can you help
> me?
>
> Thanks
> Stefano
>
> "Yves Harms" <user@domain.invalid> ha scritto nel messaggio
> news:d6k2t5$rb8$1@news.eclipse.org...
>
>>Avneesh Jain wrote:
>>
>>>In case of virtual tables is it necessary to setItemCount() for it to
>>>work
>>>properly?
>>
>>I have a case where item count is not know beforehand. If I dont
>>
>>>set item count, does it affect the scrollbar thumb size?
>>
>>As far as i know setItemCount preallocates all TableItems and adjusts the
>>scollbar thumb size. Virtual Table is not designed to be used without
>>setItemcount. It may work or may not work.
>>
>>
>>>I also wanted to know if JFace TableViewer supports virtual tables (my
>>>guess
>>>is no, but just want to confirm). Are there any plans of building that
>>>support in near future?
>>
>>It is supported in 3.1. You'll need an IlazyContentProvider and must(!)
>>call setItemCount on the TableViewer, setInput is not used for virtual
>>tables.
>
>
>
Re: Virtual Table [message #455935 is a reply to message #455911] Mon, 23 May 2005 15:04 Go to previous message
Stefano Zaccaria is currently offline Stefano ZaccariaFriend
Messages: 48
Registered: July 2009
Member
Thanks,
I'll try tonight... I'll see

"Yves Harms" <user@domain.invalid> ha scritto nel messaggio
news:d6sh9g$dr1$1@news.eclipse.org...
> Step 1 - Get it working non-lazy first:
>
> See this article to get an idea how it works non-lazy:
> http://www.eclipse.org/articles/Article-Table-viewer/table_v iewer.html
> Try to get your code working with that first. For further tips search the
> swt newsgroup, there are already a couple of helpful threads.
>
>
> Step 2 - now just some minor modifications and you're done:
> Replace your call to the TableViewers setInput(...) with a call to
> setItemCount.
> Let you Contentprovider now implement ILazyContentProvider instead of
> IStructuredContentProvider.
>
> Thats it.
>
>
>
>> Well... OK! The JFace support the TableViewer with SWT.VIRTUAL, and you
>> had said that I'll need a IlazyContentProvider for use it, well... but
>> how can i use it, in other words where I found a example that use this
>> type of table? I've try to write a code but it not fuction very well...
>> Can you help me?
>>
>> Thanks
>> Stefano
>>
>> "Yves Harms" <user@domain.invalid> ha scritto nel messaggio
>> news:d6k2t5$rb8$1@news.eclipse.org...
>>
>>>Avneesh Jain wrote:
>>>
>>>>In case of virtual tables is it necessary to setItemCount() for it to
>>>>work
>>>>properly?
>>>
>>>I have a case where item count is not know beforehand. If I dont
>>>
>>>>set item count, does it affect the scrollbar thumb size?
>>>
>>>As far as i know setItemCount preallocates all TableItems and adjusts the
>>>scollbar thumb size. Virtual Table is not designed to be used without
>>>setItemcount. It may work or may not work.
>>>
>>>
>>>>I also wanted to know if JFace TableViewer supports virtual tables (my
>>>>guess
>>>>is no, but just want to confirm). Are there any plans of building that
>>>>support in near future?
>>>
>>>It is supported in 3.1. You'll need an IlazyContentProvider and must(!)
>>>call setItemCount on the TableViewer, setInput is not used for virtual
>>>tables.
>>
>>
Previous Topic:draw2d gridbaglayout similar to swing gridbag layout
Next Topic:Adding section in a section ?
Goto Forum:
  


Current Time: Thu Mar 28 22:11:30 GMT 2024

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

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

Back to the top