[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Tree and TreeItem help

Hi All,

I'm facing a trick problem with Tree/TreeColumn/TreeItem when creating and 
cleaning up the Tree content. I need to perform queries to a database and 
show the result set in a table. But for instance, one query can return 
100.000 items and the direct next query just 10. After executing the query 
for populating the Table (Tree+TreeColumn), I'm calling Tree.clearAll(), in 
order to clean all content. But the performance is really bad.

// fragment
public void setInput(RootNode root) {
  tree.clearAll(true);
  if (root != null) {
     tree.setData(root);
     tree.setItemCount(root.getChildren().length());

     if (tree.getItemCount() > 0) {
        tree.showItem(tree.getItem(0));
     }
  }
}
// end fragment

Do you guys have any suggestion?

Thanks,

NF