Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ProgressMonitorDialog during viewer.refresh()(problem with UI thread)
ProgressMonitorDialog during viewer.refresh() [message #726684] Mon, 19 September 2011 09:16 Go to next message
Michal Niewrzal is currently offline Michal NiewrzalFriend
Messages: 50
Registered: July 2009
Member
I have quite big table with columns (more than 10 000 elements) and I provide sorting for each column. After setting sorting column and comparator parameters I need to refresh viewer. This operation take some time and I want to add any progress indicator, but refresh() method block UI from beginning to the end of refreshing, application hang for a moment. Any attempts to resolve this problem was unsuccessful. Is there any way to refresh viewer partially? Or maybe there is other way to refresh viewer after setting comparator.

I will be greatfull for any hint Smile
Re: ProgressMonitorDialog during viewer.refresh() [message #726701 is a reply to message #726684] Mon, 19 September 2011 10:04 Go to previous messageGo to next message
dwj  is currently offline dwj Friend
Messages: 2
Registered: September 2011
Junior Member
The most time cost is to calculate the sequence of the TableItems .

so I think you can use a job, when the job compolete then refresh the view.
Re: ProgressMonitorDialog during viewer.refresh() [message #726760 is a reply to message #726701] Mon, 19 September 2011 13:08 Go to previous messageGo to next message
Michal Niewrzal is currently offline Michal NiewrzalFriend
Messages: 50
Registered: July 2009
Member
Unfortunately I have used ViewerComparator to sort items. Comparator is triggered when viewer is refreshing so from my point of view I only start refresh() method. Operation is not divisible. Probably I can manually sort my data set and put it into viewer, but right now I have no time for this and I am looking for easier fix Wink
Re: ProgressMonitorDialog during viewer.refresh() [message #726957 is a reply to message #726684] Tue, 20 September 2011 04:21 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
is u r table or tableviewer virtual,if not try setting style virtual,that would make life easier...

1.http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet029VirtualTableViewer.java?view=markup

2.
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java?view=markup

In case 2 the sorting and filtering wont work,u have to do the sorting and filtering on the model and do the set input again(which by the way u can do in a job)

In case 1 i am not sure if thats the case,try it out.



---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:How to dislay the TableColumn Text align vertical?
Next Topic:StyledCellLabelProvider right aligned text
Goto Forum:
  


Current Time: Thu Apr 25 02:28:27 GMT 2024

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

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

Back to the top