Slow ListViewer [message #65896] |
Wed, 12 December 2007 15:05 |
Eclipse User |
|
|
|
Originally posted by: leeper.poczta.fm
Hi
I need to make a view with a list (ListViewer) which contains over 1000
elements. I did so, but it takes ages before the view is shown the first
time (sometimes so long, that the browser asks to break script
execution...) Anybody has any idea how to make it show faster (and not
block the browser completely for the time of loading...) ?
Thx in advance
Pli
|
|
|
Re: Slow ListViewer [message #65966 is a reply to message #65896] |
Wed, 12 December 2007 15:26 |
Eclipse User |
|
|
|
Originally posted by: just4lists.nospammail.net
From http://www.eclipse.org/rap/noteworthy/
If a table is created with the SWT.VIRTUAL flag, TableItems are only
realized client-side when they become visible. Even though, in most
situations, using the TableViewer will be more convenient, the code below
shows how the SetData event can be used to "manually" populate a VIRTUAL
table.
Table table = new Table( shell, SWT.VIRTUAL );
table.addListener( SWT.SetData, new Listener() {
public void handleEvent( final Event event ) {
TableItem item = ( TableItem )event.item;
int index = table.indexOf( item );
item.setText( "Item " + index );
}
} );
table.setItemCount( 300 );
"Pli" <leeper@poczta.fm> escreveu na mensagem
news:d43d1a2a4764885e991524c2f2df9579$1@www.eclipse.org...
> Hi
> I need to make a view with a list (ListViewer) which contains over 1000
> elements. I did so, but it takes ages before the view is shown the first
> time (sometimes so long, that the browser asks to break script
> execution...) Anybody has any idea how to make it show faster (and not
> block the browser completely for the time of loading...) ?
>
> Thx in advance
> Pli
>
|
|
|
Powered by
FUDForum. Page generated in 0.03753 seconds