Author: mes
Date: 2010-02-12 10:12:10 -0800 (Fri, 12 Feb 2010)
New Revision: 19317

Modified:
   
coreplugins/trunk/BioPAX/src/cytoscape/coreplugins/biopax/MapBioPaxToCytoscape.java
Log:
fixed code that was using deprecated custom graphic code

Modified: 
coreplugins/trunk/BioPAX/src/cytoscape/coreplugins/biopax/MapBioPaxToCytoscape.java
===================================================================
--- 
coreplugins/trunk/BioPAX/src/cytoscape/coreplugins/biopax/MapBioPaxToCytoscape.java
 2010-02-12 17:27:51 UTC (rev 19316)
+++ 
coreplugins/trunk/BioPAX/src/cytoscape/coreplugins/biopax/MapBioPaxToCytoscape.java
 2010-02-12 18:12:10 UTC (rev 19317)
@@ -19,6 +19,9 @@
 import cytoscape.task.TaskMonitor;
 import cytoscape.view.CyNetworkView;
 
+import cytoscape.render.stateful.NodeDetails;
+import cytoscape.render.stateful.CustomGraphic;
+
 import giny.model.Edge;
 import giny.view.NodeView;
 
@@ -1491,9 +1494,9 @@
                DNodeView dingNodeView = (DNodeView) nodeView;
 
                // remove existing custom nodes
-               int numExistingCustomShapes = 
dingNodeView.getCustomGraphicCount();
-               for (int lc = 0; lc < numExistingCustomShapes; lc++) {
-                       dingNodeView.removeCustomGraphic(0);
+               Iterator<CustomGraphic> it = 
dingNodeView.customGraphicIterator();
+               while ( it.hasNext() ) {
+                       dingNodeView.removeCustomGraphic( it.next() );
                }
 
                for (int lc = 0; lc < modificationCount; lc++) {
@@ -1517,7 +1520,7 @@
                        }
 
                        // add the graphic
-                       dingNodeView.addCustomGraphic(rect, paint, lc);
+                       dingNodeView.addCustomGraphic(rect, paint, 
NodeDetails.ANCHOR_CENTER);
                }
        }
 

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