Author: pwang
Date: 2008-09-11 14:21:49 -0700 (Thu, 11 Sep 2008)
New Revision: 14890
Modified:
csplugins/trunk/ucsd/pwang/SessionForWebPlugin/src/SessionForWebPlugin/SpeciesPanel.java
Log:
Sort the network titles in natural order
Modified:
csplugins/trunk/ucsd/pwang/SessionForWebPlugin/src/SessionForWebPlugin/SpeciesPanel.java
===================================================================
---
csplugins/trunk/ucsd/pwang/SessionForWebPlugin/src/SessionForWebPlugin/SpeciesPanel.java
2008-09-11 20:15:16 UTC (rev 14889)
+++
csplugins/trunk/ucsd/pwang/SessionForWebPlugin/src/SessionForWebPlugin/SpeciesPanel.java
2008-09-11 21:21:49 UTC (rev 14890)
@@ -19,6 +19,7 @@
import java.util.Iterator;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.ListSelectionEvent;
+import java.util.Arrays;
//import SessionForWebPlugin.NetworksTable.NetworksTableMouseListener;
//import SessionForWebPlugin.NetworksTable.NetworksTableMouseMotionListener;
@@ -136,11 +137,11 @@
Map<String,String> theMap =
SessionForWebPlugin.networkTitleToSpeciesMap();
- Set<String> keySet = theMap.keySet();
- Iterator<String> it = keySet.iterator();
+ Object[] keyArray = theMap.keySet().toArray();
+ Arrays.sort(keyArray);
- while (it.hasNext()) {
- String networkTitle = (String) it.next();
+ for (int i=0; i< keyArray.length; i++) {
+ String networkTitle = (String) keyArray[i];
String species = theMap.get(networkTitle);
if (species == null || species.trim().equals("")) {
species = "unknown";
@@ -149,6 +150,7 @@
oneRow.add(networkTitle);
oneRow.add(species);
data.add(oneRow);
+
}
return data;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---