Author: pwang
Date: 2009-12-18 17:00:03 -0800 (Fri, 18 Dec 2009)
New Revision: 18796
Modified:
cytoscape/trunk/src/cytoscape/actions/LoadNetworkTask.java
Log:
Fixed bug 2120: "Loading Network" dialog should say "Loaded Network" and then
display something else when loading multiple networks
Modified: cytoscape/trunk/src/cytoscape/actions/LoadNetworkTask.java
===================================================================
--- cytoscape/trunk/src/cytoscape/actions/LoadNetworkTask.java 2009-12-19
00:29:03 UTC (rev 18795)
+++ cytoscape/trunk/src/cytoscape/actions/LoadNetworkTask.java 2009-12-19
01:00:03 UTC (rev 18796)
@@ -72,8 +72,8 @@
import java.text.NumberFormat;
import javax.swing.JOptionPane;
+import cytoscape.data.readers.NNFReader;
-
/**
* Task to load a new network.
*/
@@ -291,7 +291,15 @@
private void informUserOfGraphStats(CyNetwork newNetwork) {
NumberFormat formatter = new DecimalFormat("#,###,###");
StringBuffer sb = new StringBuffer();
-
+
+ String msg = "";
+ if (reader instanceof NNFReader){
+ NNFReader theReader = (NNFReader) reader;
+ msg += "Successfully loaded "+
theReader.getNetworks().size() +" nested networks from " + name;
+ taskMonitor.setStatus(msg);
+ return;
+ }
+
// Give the user some confirmation
sb.append("Successfully loaded network from: ");
sb.append(name);
@@ -303,7 +311,7 @@
.getProperty("viewThreshold"))) {
sb.append("Network is under "
+
CytoscapeInit.getProperties().getProperty("viewThreshold")
- + " nodes. A view will be automatically
created.");
+ + " nodes. A view has been created
automatically.");
} else {
sb.append("Network is over "
+
CytoscapeInit.getProperties().getProperty("viewThreshold")
@@ -345,6 +353,10 @@
* @return Task Title.
*/
public String getTitle() {
- return new String("Loading Network");
+ if (reader instanceof NNFReader){
+ return new String("Loaded Networks");
+ }
+
+ return new String("Loaded Network");
}
}
--
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.