Author: pwang
Date: 2011-04-04 14:01:54 -0700 (Mon, 04 Apr 2011)
New Revision: 24661

Modified:
   
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/task/SwingTaskManager.java
Log:
Pass the Desktop reference to Tunable Dialog

Modified: 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/task/SwingTaskManager.java
===================================================================
--- 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/task/SwingTaskManager.java
       2011-04-04 21:00:40 UTC (rev 24660)
+++ 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/task/SwingTaskManager.java
       2011-04-04 21:01:54 UTC (rev 24661)
@@ -11,10 +11,7 @@
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
-
 import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-
 import org.cytoscape.work.AbstractTaskManager;
 import org.cytoscape.work.Task;
 import org.cytoscape.work.TaskFactory;
@@ -124,13 +121,14 @@
         * @param owner JDialogs created by this <code>TaskManager</code>
         * will have its owner set to this parameter.
         */
-       @Override public void setParent(final Window parent) {
+       @Override 
+       public void setParent(final Window parent) {
                this.parent = parent;
        }
 
        @Override
        public void setTunablePanel(final JPanel tunablePanel) {
-               
((GUITunableInterceptor)tunableInterceptor).setParent(tunablePanel);
+               
((GUITunableInterceptor)tunableInterceptor).setTunablePanel(tunablePanel);
        }
 
        @Override
@@ -145,6 +143,12 @@
                            
!tunableInterceptor.validateAndWriteBackTunables(factory))
                                throw new IllegalArgumentException("Tunables 
are not valid");
 
+                       // pass the parent (Cytoscape desktop Window) for 
TunableDialog
+                       if (tunableInterceptor instanceof 
GUITunableInterceptor){
+                               GUITunableInterceptor guiTI = 
(GUITunableInterceptor)tunableInterceptor;                                
+                               guiTI.setParent(parent);
+                       }
+                       
                        taskIterator = factory.getTaskIterator();
 
                        // Get the first task and display its tunables.  This 
is a bit of a hack.  

-- 
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.

Reply via email to