Virtual Table [message #455834] |
Thu, 19 May 2005 19:47  |
Eclipse User |
|
|
|
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 #455935 is a reply to message #455911] |
Mon, 23 May 2005 11:04  |
Eclipse User |
|
|
|
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.
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.07234 seconds