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

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();
}