Author: jm
Date: 2013-01-11 12:11:30 -0800 (Fri, 11 Jan 2013)
New Revision: 31039
Modified:
core3/support/branches/3.0.0-release/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
Log:
Fixes #1558: Fixed threading issue in SplashManipulator
Modified:
core3/support/branches/3.0.0-release/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
===================================================================
---
core3/support/branches/3.0.0-release/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
2013-01-11 18:18:50 UTC (rev 31038)
+++
core3/support/branches/3.0.0-release/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
2013-01-11 20:11:30 UTC (rev 31039)
@@ -7,6 +7,8 @@
import java.util.HashSet;
import java.util.Set;
+import javax.swing.SwingUtilities;
+
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -66,8 +68,18 @@
}
}
- private synchronized void renderSplashFrame(String message) {
- if ( g == null || splash == null || !splash.isVisible() )
+ private synchronized void renderSplashFrame(final String message) {
+ if (!SwingUtilities.isEventDispatchThread()) {
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ renderSplashFrame(message);
+ }
+ });
+ return;
+ }
+
+ if ( g == null || splash == null || !splash.isVisible())
return;
g.setColor(Color.WHITE);
g.fillRect(20,300,800,40);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.