Re: [Java-gnome-developer] ProgressBar
Brought to you by:
afcowie
From: Alfonso <eu...@ya...> - 2008-02-27 12:50:16
|
Andrew Cowie wrote: > On Tue, 2008-02-26 at 11:09 +0100, Alfonso wrote: > >> - One is the pulse method, to activate the progressbar. >> > > ProgressBar has setFraction(), but you're right. No one has exposed > pulse() as yet. Perhaps you'd like to contribute that and the attendant > documentation? See HACKING. > > >> - On the other side, to make the progressbar update while doing other >> work >> > > java-gnome is thread safe. Do your "other work" in a worker thread, and > make the calls to update your ProgressBar from there. So long as the > main loop is running [ie, a thread has called Gtk.main()] things will > work right. > > If you grab the source code, you'll see > tests/prototype/WorkerThreads.java. That's not a tutorial, as such, but > if you have a read of that you should get the idea. It's the program > that was used in the testing discussed in the second link below. > > [Hm. We should move that to doc/examples/ one of these days] > > You can find discussion of the theory that led up to our thread safety > design at > http://research.operationaldynamics.com/blogs/andrew/software/gnome-desktop/gtk-thread-awareness.html (part 1) and then http://research.operationaldynamics.com/blogs/andrew/software/java-gnome/thread-safety-for-java.html (part 2). There is mention of the GDK lock at http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gdk/Gdk.html > > AfC > Sydney > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > Thread safe? That's great news to hear. Thank you very much for your answer. As for hacking, not shure if I have the needed knowledge to do it, but I'll have a look at the section, just in case I'm wrong. By the way, congrats for the excelent work you all are doing there. (I don't understand why aren't more enterprises contributing to this project. As I see it, it's a very important project for linux...). |