Author: scooter
Date: 2011-04-04 19:50:58 -0700 (Mon, 04 Apr 2011)
New Revision: 24670

Added:
   csplugins/trunk/ucsf/scooter/nodeCharts/examples/pie3.com
Modified:
   csplugins/trunk/ucsf/scooter/nodeCharts/examples/heatstrip.com
   csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml
   
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/NodeChartCommandHandler.java
   
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/ValueUtils.java
Log:
Sanity checking and a new example


Modified: csplugins/trunk/ucsf/scooter/nodeCharts/examples/heatstrip.com
===================================================================
--- csplugins/trunk/ucsf/scooter/nodeCharts/examples/heatstrip.com      
2011-04-05 02:02:26 UTC (rev 24669)
+++ csplugins/trunk/ucsf/scooter/nodeCharts/examples/heatstrip.com      
2011-04-05 02:50:58 UTC (rev 24670)
@@ -1,4 +1,4 @@
-session open file="/home/scooter/Documents/galFiltered.cys"
+session open file="/Users/scooter/Documents/galFiltered.cys"
 nodecharts heatstrip nodelist="all" 
attributelist="gal1RGexp,gal4RGexp,gal80Rexp" colorlist="redgreen" 
normalize="true" showlabels="false" size="40x60" position=south
 
 network view update

Added: csplugins/trunk/ucsf/scooter/nodeCharts/examples/pie3.com
===================================================================
--- csplugins/trunk/ucsf/scooter/nodeCharts/examples/pie3.com                   
        (rev 0)
+++ csplugins/trunk/ucsf/scooter/nodeCharts/examples/pie3.com   2011-04-05 
02:50:58 UTC (rev 24670)
@@ -0,0 +1,3 @@
+nodecharts pie nodelist="all" attributelist="gal1RGsig,gal4RGsig,gal80Rsig" 
colorlist="contrasting"
+
+network view update

Modified: csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml
===================================================================
--- csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml     2011-04-05 02:02:26 UTC 
(rev 24669)
+++ csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml     2011-04-05 02:50:58 UTC 
(rev 24670)
@@ -86,7 +86,7 @@
     <dependency>
       <groupId>cytoscape</groupId>
       <artifactId>application</artifactId>
-      <version>2.8.0</version>
+      <version>2.8.1-beta2-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
   </dependencies>

Modified: 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/NodeChartCommandHandler.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/NodeChartCommandHandler.java
       2011-04-05 02:02:26 UTC (rev 24669)
+++ 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/NodeChartCommandHandler.java
       2011-04-05 02:50:58 UTC (rev 24670)
@@ -248,6 +248,9 @@
                                        ValueUtils.normalize(values, maxValues);
                        }
 
+                       if (values == null || values.size() == 0)
+                               continue;
+
                        Rectangle2D bbox = ViewUtils.getNodeBoundingBox(node, 
size, view, pos, scale);
                        List<CustomGraphic> cgList = 
viewer.getCustomGraphics(args, values, labels, bbox, view);
                        ViewUtils.addCustomGraphics(cgList, node, view);

Modified: 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/ValueUtils.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/ValueUtils.java
    2011-04-05 02:02:26 UTC (rev 24669)
+++ 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/command/ValueUtils.java
    2011-04-05 02:50:58 UTC (rev 24670)
@@ -60,7 +60,10 @@
                if (input instanceof String) {
                        values = ValueUtils.parseStringList((String)input);
                } else if (input instanceof List) {
-                       Object o = ((List)input).get(0);
+                       List l = (List)input;
+                       if (l == null || l.size() == 0)
+                               return null;
+                       Object o = l.get(0);
                        if (o instanceof Double) {
                                values = (List<Double>)input;
                        } else if (o instanceof String) {

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