Author: thully
Date: 2012-11-26 15:59:00 -0800 (Mon, 26 Nov 2012)
New Revision: 30842

Modified:
   
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/BiomartClient.java
   
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/task/ImportTableTask.java
Log:
Changes to Biomart dialog focus order to improve user experience (#1574)

Modified: 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/BiomartClient.java
===================================================================
--- 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/BiomartClient.java
        2012-11-26 23:12:16 UTC (rev 30841)
+++ 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/BiomartClient.java
        2012-11-26 23:59:00 UTC (rev 30842)
@@ -31,7 +31,6 @@
 
 import javax.naming.ConfigurationException;
 
-import org.cytoscape.application.swing.CySwingApplication;
 import org.cytoscape.io.webservice.TableImportWebServiceClient;
 import org.cytoscape.io.webservice.biomart.rest.BiomartRestClient;
 import org.cytoscape.io.webservice.biomart.task.ImportTableTask;
@@ -53,7 +52,6 @@
        private final CyTableFactory tableFactory;
        private final BiomartRestClient restClient;
        private ImportTableTask importTask;
-       private final CySwingApplication app;
        private final CyTableManager tableManager;
        private final MapTableToNetworkTablesTaskFactory mapNetworkAttrTF;
 
@@ -65,7 +63,7 @@
         */
        public BiomartClient(final String displayName, final String description,
                             final BiomartRestClient restClient, final 
CyTableFactory tableFactory,
-                            final CySwingApplication app, final CyTableManager 
tableManager,
+                            final CyTableManager tableManager,
                                                 final BiomartAttrMappingPanel 
gui,
                                                 final 
MapTableToNetworkTablesTaskFactory mapNetworkAttrTF)
        {
@@ -73,7 +71,6 @@
 
                this.tableFactory         = tableFactory;
                this.restClient           = restClient;
-               this.app                  = app;
                this.tableManager         = tableManager;
                this.mapNetworkAttrTF     = mapNetworkAttrTF;
                
@@ -94,7 +91,7 @@
                                        "Could not build query because Query 
Builder GUI is null.");
 
                importTask = new ImportTableTask(restClient, (BiomartQuery) 
query, tableFactory,
-                                                app.getJFrame(), 
tableManager,mapNetworkAttrTF);
+                                                 
tableManager,mapNetworkAttrTF);
 
                return new TaskIterator(importTask);
        }

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-11-26 23:12:16 UTC (rev 30841)
+++ 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
  2012-11-26 23:59:00 UTC (rev 30842)
@@ -4,7 +4,6 @@
 import java.util.Properties;
 
 import org.cytoscape.application.CyApplicationManager;
-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;
@@ -25,7 +24,6 @@
        public void start(BundleContext bc) {
 
                // Import services
-               CySwingApplication cySwingApplicationServiceRef = 
getService(bc,CySwingApplication.class);
                DialogTaskManager taskManagerServiceRef = 
getService(bc,DialogTaskManager.class);
                CyNetworkManager cyNetworkManagerServiceRef = 
getService(bc,CyNetworkManager.class);
                CyTableManager cyTableManagerServiceRef = 
getService(bc,CyTableManager.class);
@@ -39,7 +37,7 @@
                BiomartRestClient biomartRestClient = new 
BiomartRestClient("http://www.biomart.org/biomart/martservice";);
                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);
+               BiomartClient biomartClient = new BiomartClient("BioMart 
Client","REST version of BioMart Web Service 
Client.",biomartRestClient,cyTableFactoryServiceRef,cyTableManagerServiceRef, 
biomartAttrMappingPanel, mapNetworkAttrTFServiceRef);
                biomartAttrMappingPanel.setClient(biomartClient);
                
                registerAllServices(bc,biomartAttrMappingPanel, new 
Properties());

Modified: 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/task/ImportTableTask.java
===================================================================
--- 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/task/ImportTableTask.java
 2012-11-26 23:12:16 UTC (rev 30841)
+++ 
core3/impl/trunk/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/task/ImportTableTask.java
 2012-11-26 23:59:00 UTC (rev 30842)
@@ -37,20 +37,17 @@
        private Set<CyTable> tables;
 
 
-       private final Window parent;
        private final CyTableManager tableManager;
        private final MapTableToNetworkTablesTaskFactory mapNetworkAttrTF;
 
        public ImportTableTask(final BiomartRestClient client, final 
BiomartQuery query,
                               final CyTableFactory tableFactory,
-                              final Window parent,
                               final CyTableManager tableManager,
                                   final MapTableToNetworkTablesTaskFactory 
mapNetworkAttrTF)
        {
                this.client               = client;
                this.query                = query;
                this.tableFactory         = tableFactory;
-               this.parent               = parent;
                this.tableManager         = tableManager;
                this.mapNetworkAttrTF     = mapNetworkAttrTF;
 
@@ -79,12 +76,12 @@
                result.close();
 
                tables.add(newTable);
-
-               final TaskIterator ti = 
mapNetworkAttrTF.createTaskIterator(newTable);
-               this.insertTasksAfterCurrentTask(ti);
                
                final ShowResultTask messageTask = new ShowResultTask();
                this.insertTasksAfterCurrentTask(messageTask);
+
+               final TaskIterator ti = 
mapNetworkAttrTF.createTaskIterator(newTable);
+               this.insertTasksAfterCurrentTask(ti);
        }
 
        private CyTable createGlobalTable(BufferedReader reader, String key) 
throws IOException {
@@ -233,7 +230,7 @@
                                SwingUtilities.invokeLater(new Runnable() {
                                        @Override
                                        public void run() {
-                                               
JOptionPane.showMessageDialog(parent, "New table loaded.\n" + table.getTitle() 
+ " contains "
+                                               
JOptionPane.showMessageDialog(null,"New table loaded.\n" + table.getTitle() + " 
contains "
                                                                + 
table.getRowCount() + " rows.", "Table Loaded from BioMart",
                                                                
JOptionPane.INFORMATION_MESSAGE);
 

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