[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: missing column headers in large tables

Hi,

I see problem #1 (I'm on win2000), and I could not find an existing report
for it, so if you want you can log one at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=SWT .
It gives the appearance of being an OS bug or limitation.

Problem #2 is generally known for very large sets of columns, though I found
horizontal scrolling in your example to be reasonable.  There is not a
workaround to suggest for this, other than to consider alternative UI
designs, because a 1000-column Table is rarely nice from a user's
perspective (neither is a 500+ column table, which may explain why no one
has previously reported problem #1).

Grant


"Chris" <chris.brown@xxxxxxx> wrote in message
news:92325d261af396ada55dfdb20f133c8a$1@xxxxxxxxxxxxxxxxxx
> I am working on an RCP editor component that displays a very large tabular
> dataset (>1000 columns) using an SWT table object. Performance is
> extremely sluggish, even when the row count is very low. A couple of
> general questions:
>
> 1) Most important: after around 500 columns or so, the column headers
> simply are not painted anymore. They just disappear (see the example code
> below).
> 2) Horizontal scrolling is extremely slow, regardless of column count. I
> do not see the same sluggishness for vertical scrolling (and I am even
> using a virtual table). Is this configurable?
> 3) Are there any other general pointers out there for improving the
> responsiveness of a Table for large column count, as far as the painting
> to the screen (i.e. double buffering, etc.)?
>
> Thanks,
> Chris
>
>
> public static void main(String args[]){
>   int numCols = 600;
>   int numRows=100;
>
>   Display display = new Display();
>   Shell shell = new Shell(display);
>   shell.setLayout(new GridLayout());
>   Table table = new Table(shell, SWT.MULTI | SWT.BORDER |
> SWT.FULL_SELECTION);
>   table.setLinesVisible(true);
>   table.setHeaderVisible(true);
>   GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
>   table.setLayoutData(data);
>
>   //create columns
>   for(int i=0; i<numCols; i++){
>     TableColumn column = new TableColumn(table,SWT.NONE);
>     column.setText("column"+i);
>   }
>
>   //create rows
>   for(int i=0; i<numRows; i++){
>     TableItem item = new TableItem(table,SWT.NONE);
>     for(int x=0; x<numCols; x++){
>       item.setText(x,"abc"+x);
>     }
>   }
>
>   for(int i=0; i<numCols; i++){
>     table.getColumn(i).pack();
>   }
>   shell.open();
>
>   while(!shell.isDisposed()){
>     if(!display.readAndDispatch()){
>       display.sleep();
>     }
>   }
>   display.dispose();
> }
>
>
>