Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing + SWT, change mouse cursor to WAIT (newbie question)  RSS feed

 
Piotr Gajowy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all!

I am a new to Eclipse RCP and I am having a trouble with getting a few things done correctly. The thing that I want to do is to change mouse cursor in whole application.
I have 2 views in my app, one is a setting pane and the other one presents results. Both of them incorporate Swing containers, because I had to use old pieces of code, special graphs etc.
Loading the result pane takes time, usually a few seconds. Meanwhile I want the cursor to be changed. So, when I press the correct button, I try to do something like that:


Register.getMapaView().loadMap() is the part, that takes so much time. Now my enableWaitCursor() looks like that:



I found somewhere on the web, that it is the way I should go. But... It looks strange. It's an infinite loop. How do I reverse the change of the cursor? Is it really OK the way I did it? Plus, when I move the cursor, it flickers as it turns to the arrow back when it is on the move and gets back to the "busy" when stops. And at last, when I exit the application, I get an error:
"!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.progress.TaskBarProgressManager$2". I suppose it's the thread I run to change the mouse cursor.

Thanks for any help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!