Author: jm
Date: 2012-09-26 10:39:43 -0700 (Wed, 26 Sep 2012)
New Revision: 30490
Modified:
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/ui/BiomartAttrMappingPanel.java
Log:
Fixes #1478: Correct parent window is now being set for tunable dialog
Modified:
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
===================================================================
---
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
2012-09-26 16:19:08 UTC (rev 30489)
+++
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
2012-09-26 17:39:43 UTC (rev 30490)
@@ -7,6 +7,7 @@
import org.cytoscape.application.swing.CySwingApplication;
import org.cytoscape.io.webservice.biomart.rest.BiomartRestClient;
import org.cytoscape.io.webservice.biomart.ui.BiomartAttrMappingPanel;
+import org.cytoscape.io.webservice.swing.WebServiceGUI;
import org.cytoscape.model.CyNetworkManager;
import org.cytoscape.model.CyTableFactory;
import org.cytoscape.model.CyTableManager;
@@ -31,11 +32,12 @@
CyApplicationManager cyApplicationManagerServiceRef =
getService(bc,CyApplicationManager.class);
CyTableFactory cyTableFactoryServiceRef =
getService(bc,CyTableFactory.class);
MapTableToNetworkTablesTaskFactory mapNetworkAttrTFServiceRef =
getService(bc,MapTableToNetworkTablesTaskFactory.class);
+
+ WebServiceGUI webServiceGUI =
getService(bc,WebServiceGUI.class);
-
// Export services
BiomartRestClient biomartRestClient = new
BiomartRestClient("http://www.biomart.org/biomart/martservice");
- BiomartAttrMappingPanel biomartAttrMappingPanel = new
BiomartAttrMappingPanel(taskManagerServiceRef,cyApplicationManagerServiceRef,cyTableManagerServiceRef,cyNetworkManagerServiceRef);
+ BiomartAttrMappingPanel biomartAttrMappingPanel = new
BiomartAttrMappingPanel(taskManagerServiceRef,cyApplicationManagerServiceRef,cyTableManagerServiceRef,cyNetworkManagerServiceRef,
webServiceGUI);
BiomartClient biomartClient = new BiomartClient("BioMart
Client","REST version of BioMart Web Service
Client.",biomartRestClient,cyTableFactoryServiceRef,cySwingApplicationServiceRef,cyTableManagerServiceRef,
biomartAttrMappingPanel, mapNetworkAttrTFServiceRef);
biomartAttrMappingPanel.setClient(biomartClient);
Modified:
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/ui/BiomartAttrMappingPanel.java
===================================================================
---
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/ui/BiomartAttrMappingPanel.java
2012-09-26 16:19:08 UTC (rev 30489)
+++
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/ui/BiomartAttrMappingPanel.java
2012-09-26 17:39:43 UTC (rev 30490)
@@ -34,6 +34,8 @@
*/
package org.cytoscape.io.webservice.biomart.ui;
+import java.awt.Container;
+import java.awt.Window;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Collections;
@@ -44,11 +46,12 @@
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
-import javax.swing.JComboBox;
import javax.swing.event.AncestorEvent;
import javax.swing.event.AncestorListener;
import org.cytoscape.application.CyApplicationManager;
+import org.cytoscape.application.swing.CySwingApplication;
+import org.cytoscape.io.webservice.TableImportWebServiceClient;
import org.cytoscape.io.webservice.biomart.BiomartClient;
import org.cytoscape.io.webservice.biomart.BiomartQuery;
import org.cytoscape.io.webservice.biomart.rest.Attribute;
@@ -60,6 +63,7 @@
import org.cytoscape.io.webservice.biomart.task.LoadRepositoryResult;
import org.cytoscape.io.webservice.biomart.task.LoadRepositoryTask;
import org.cytoscape.io.webservice.biomart.task.ShowBiomartDialogTask;
+import org.cytoscape.io.webservice.swing.WebServiceGUI;
import org.cytoscape.model.CyColumn;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyNetworkManager;
@@ -99,13 +103,17 @@
private boolean initialized = false;
+ private WebServiceGUI webServiceGUI;
+
public BiomartAttrMappingPanel(final DialogTaskManager taskManager,
final CyApplicationManager appManager,
- final CyTableManager tblManager, final CyNetworkManager
netManager) {
+ final CyTableManager tblManager, final CyNetworkManager
netManager, WebServiceGUI webServiceGUI) {
super(tblManager, netManager, LOGO, "Biomart", "Import
Settings");
this.taskManager = taskManager;
this.appManager = appManager;
this.globalTableCounter = 0;
+
+ this.webServiceGUI = webServiceGUI;
}
public void setClient(final BiomartClient client) {
@@ -133,7 +141,8 @@
LoadRepositoryTask firstTask = new
LoadRepositoryTask(client.getRestClient());
ShowBiomartDialogTask showDialogTask = new
ShowBiomartDialogTask(this, firstTask);
- taskManager.setExecutionContext(null);
+ Window parentWindow =
webServiceGUI.getWindow(TableImportWebServiceClient.class);
+ taskManager.setExecutionContext(parentWindow);
taskManager.execute(new TaskIterator(firstTask,
showDialogTask));
initialized = true;
}
--
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.