Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Gradually filling a virtual table
Gradually filling a virtual table [message #438571] Mon, 28 June 2004 10:34 Go to next message
Eclipse UserFriend
Originally posted by: thomas_maeder.ch.ibm.com

Hello everyone,

I've been playing around with the virtual table implementation in 3.0.
I've come across a scenario where I don't know how to use the
"virtualness" to my advantage: Here's what I'd like to do:

1) I'd like to show a sorted list of elements in the table
2) I start out with 0 elements in the table
3) every 500 ms, I'd like to add around 1000 elements. They should show
up at the location where they belong in the sort order (may be at the
beginnning).

Here are a couple of things I tried:

1) if I just increase the table count by 1000, I do not get a setData
callback for already existing table items
2) If I work around this by doing a
table.setItemCount(0);
table.setItemCount(realValue);

The table flashes.

3) If I add the new items by doing new TableItem(...), I get the same
behaviour as in the non-virtual case (i.e. the performance degrades as
the table contains more elements). (Perhaps the defaul-visible
constructor with the "create" parameter should be public?)

what am I missing?


Thomas
Re: Gradually filling a virtual table [message #438683 is a reply to message #438571] Wed, 30 June 2004 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas_maeder.ch.ibm.com

Everybody on vacation, I guess? Or is that use just not supported?

Thomas Mäder wrote:
> Hello everyone,
>
> I've been playing around with the virtual table implementation in 3.0.
> I've come across a scenario where I don't know how to use the
> "virtualness" to my advantage: Here's what I'd like to do:
>
> 1) I'd like to show a sorted list of elements in the table
> 2) I start out with 0 elements in the table
> 3) every 500 ms, I'd like to add around 1000 elements. They should show
> up at the location where they belong in the sort order (may be at the
> beginnning).
>
> Here are a couple of things I tried:
>
> 1) if I just increase the table count by 1000, I do not get a setData
> callback for already existing table items
> 2) If I work around this by doing a
> table.setItemCount(0);
> table.setItemCount(realValue);
>
> The table flashes.
>
> 3) If I add the new items by doing new TableItem(...), I get the same
> behaviour as in the non-virtual case (i.e. the performance degrades as
> the table contains more elements). (Perhaps the defaul-visible
> constructor with the "create" parameter should be public?)
>
> what am I missing?
>
>
> Thomas
Re: Gradually filling a virtual table [message #438695 is a reply to message #438683] Wed, 30 June 2004 13:54 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Steve is the best one to answer your question but he is at JavaOne. I will
have a look at this.

"Thomas M
Re: Gradually filling a virtual table [message #439053 is a reply to message #438695] Mon, 05 July 2004 20:22 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Steve says use:

table.setItemCount(realValue);
table.clearAll();

Snippet will be posted soon.

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:cbugm1$5ns$1@eclipse.org...
> Steve is the best one to answer your question but he is at JavaOne. I
will
> have a look at this.
>
> "Thomas M
Re: Gradually filling a virtual table [message #439116 is a reply to message #439053] Tue, 06 July 2004 08:13 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Hello Veronika Irvine,

Veronika Irvine schrieb:
> Steve says use:
>
> table.setItemCount(realValue);
> table.clearAll();
>
> Snippet will be posted soon.
>

It would be nice, if you would post it publicly!

Thanks,

Daniel Krügler
Re: Gradually filling a virtual table [message #439186 is a reply to message #439053] Tue, 06 July 2004 17:54 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
I have added the following snippet:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/snippits/snippet151.html

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:cccd7v$552$1@eclipse.org...
> Steve says use:
>
> table.setItemCount(realValue);
> table.clearAll();
>
> Snippet will be posted soon.
>
> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> news:cbugm1$5ns$1@eclipse.org...
> > Steve is the best one to answer your question but he is at JavaOne. I
> will
> > have a look at this.
> >
> > "Thomas M
Previous Topic:Add controls after shell open...
Next Topic:view layout
Goto Forum:
  


Current Time: Fri Mar 29 11:36:00 GMT 2024

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

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

Back to the top