Author: scooter
Date: 2013-01-17 14:35:31 -0800 (Thu, 17 Jan 2013)
New Revision: 31050

Modified:
   csplugins/trunk/ucsf/scooter/enhancedcg/pom.xml
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/AbstractEnhancedCustomGraphics.java
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/bar/BarChart.java
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/heatstrip/HeatStripChart.java
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/line/LineChart.java
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/pie/PieChart.java
   
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/stripe/StripeChart.java
Log:
Changes to support new custom graphics API


Modified: csplugins/trunk/ucsf/scooter/enhancedcg/pom.xml
===================================================================
--- csplugins/trunk/ucsf/scooter/enhancedcg/pom.xml     2013-01-16 21:06:56 UTC 
(rev 31049)
+++ csplugins/trunk/ucsf/scooter/enhancedcg/pom.xml     2013-01-17 22:35:31 UTC 
(rev 31050)
@@ -4,7 +4,7 @@
        <properties>
                <bundle.symbolicName>enhancedcg</bundle.symbolicName>
                
<bundle.namespace>edu.ucsf.rbvi.enhancedcg.internal</bundle.namespace>
-               
<cytoscape.api.version>3.0.0-beta3-SNAPSHOT</cytoscape.api.version>
+               <cytoscape.api.version>3.0.0</cytoscape.api.version>
                
                <maven-bundle-plugin.version>2.3.4</maven-bundle-plugin.version>
                <osgi.api.version>4.2.0</osgi.api.version>

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/AbstractEnhancedCustomGraphics.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/AbstractEnhancedCustomGraphics.java
    2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/AbstractEnhancedCustomGraphics.java
    2013-01-17 22:35:31 UTC (rev 31050)
@@ -16,6 +16,9 @@
 
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
+import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import org.cytoscape.view.presentation.customgraphics.CyCustomGraphics;
 import org.cytoscape.view.presentation.customgraphics.CyCustomGraphicsFactory;
@@ -45,7 +48,8 @@
        public void setHeight(final int height) { this.height = height; }
        public int getWidth() { return width; }
        public int getHeight() { return height; }
-       public List<T> getLayers(CyNetwork network, CyIdentifiable node) { 
return layers; }
+       @Override
+       public List<T> getLayers(CyNetworkView networkView, View nodeView) { 
return layers; }
        public String getDisplayName() { return displayName; }
        public void setDisplayName(final String displayName) {
                this.displayName = displayName;

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/bar/BarChart.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/bar/BarChart.java
       2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/bar/BarChart.java
       2013-01-17 22:35:31 UTC (rev 31050)
@@ -53,6 +53,8 @@
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import edu.ucsf.rbvi.enhancedcg.internal.charts.AbstractChartCustomGraphics;
 
@@ -102,13 +104,17 @@
        public Image getRenderedImage() { return null; }
 
        @Override 
-       public List<BarLayer> getLayers(CyNetwork network, CyIdentifiable node) 
{ 
+       public List<BarLayer> getLayers(CyNetworkView networkView, View 
nodeView) { 
+               CyNetwork network = networkView.getModel();
+               if (!(nodeView.getModel() instanceof CyNode))
+                       return null;
+
+               CyNode node = (CyNode)nodeView.getModel();
+
                // Create all of our pie slices. Each slice becomes a layer
                if (attributes != null && attributes.size() > 0) {
-                       if (!(node instanceof CyNode))
-                               return null;
 
-                       values = getDataFromAttributes (network, (CyNode)node, 
attributes, labels);
+                       values = getDataFromAttributes (network, node, 
attributes, labels);
                        colorList = convertInputToColor(colorString, values);
                }
 

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/heatstrip/HeatStripChart.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/heatstrip/HeatStripChart.java
   2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/heatstrip/HeatStripChart.java
   2013-01-17 22:35:31 UTC (rev 31050)
@@ -53,6 +53,8 @@
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import edu.ucsf.rbvi.enhancedcg.internal.charts.AbstractChartCustomGraphics;
 
@@ -118,12 +120,14 @@
        public Image getRenderedImage() { return null; }
 
        @Override 
-       public List<HeatStripLayer> getLayers(CyNetwork network, CyIdentifiable 
node) { 
+       public List<HeatStripLayer> getLayers(CyNetworkView networkView, View 
nodeView) { 
+               CyNetwork network = networkView.getModel();
+               if (!(nodeView.getModel() instanceof CyNode))
+                               return null;
+               CyNode node = (CyNode)nodeView.getModel();
+
                // Create all of our pie slices. Each slice becomes a layer
                if (attributes != null && attributes.size() > 0) {
-                       if (!(node instanceof CyNode))
-                               return null;
-
                        values = getDataFromAttributes (network, (CyNode)node, 
attributes, labels);
                }
 

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/line/LineChart.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/line/LineChart.java
     2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/line/LineChart.java
     2013-01-17 22:35:31 UTC (rev 31050)
@@ -53,6 +53,8 @@
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import edu.ucsf.rbvi.enhancedcg.internal.charts.AbstractChartCustomGraphics;
 
@@ -102,12 +104,13 @@
        public Image getRenderedImage() { return null; }
 
        @Override 
-       public List<LineLayer> getLayers(CyNetwork network, CyIdentifiable 
node) { 
+       public List<LineLayer> getLayers(CyNetworkView networkView, View 
nodeView) { 
+               CyNetwork network = networkView.getModel();
+               if (!(nodeView.getModel() instanceof CyNode))
+                               return null;
+               CyNode node = (CyNode)nodeView.getModel();
                // Create all of our pie slices. Each slice becomes a layer
                if (attributes != null && attributes.size() > 0) {
-                       if (!(node instanceof CyNode))
-                               return null;
-
                        values = getDataFromAttributes (network, (CyNode)node, 
attributes, labels);
                        colorList = convertInputToColor(colorString, values);
                }

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/pie/PieChart.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/pie/PieChart.java
       2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/pie/PieChart.java
       2013-01-17 22:35:31 UTC (rev 31050)
@@ -54,6 +54,8 @@
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import edu.ucsf.rbvi.enhancedcg.internal.charts.AbstractChartCustomGraphics;
 
@@ -125,12 +127,14 @@
        public Image getRenderedImage() { return null; }
 
        @Override 
-       public List<PieLayer> getLayers(CyNetwork network, CyIdentifiable node) 
{ 
+       public List<PieLayer> getLayers(CyNetworkView networkView, View 
nodeView) { 
+               CyNetwork network = networkView.getModel();
+               if (!(nodeView.getModel() instanceof CyNode))
+                               return null;
+               CyNode node = (CyNode)nodeView.getModel();
+
                // Create all of our pie slices. Each slice becomes a layer
                if (attributes != null && attributes.size() > 0) {
-                       if (!(node instanceof CyNode))
-                               return null;
-
                        values = getDataFromAttributes (network, (CyNode)node, 
attributes, labels);
                        colorList = convertInputToColor(colorString, values);
                }

Modified: 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/stripe/StripeChart.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/stripe/StripeChart.java
 2013-01-16 21:06:56 UTC (rev 31049)
+++ 
csplugins/trunk/ucsf/scooter/enhancedcg/src/main/java/edu/ucsf/rbvi/internal/charts/stripe/StripeChart.java
 2013-01-17 22:35:31 UTC (rev 31050)
@@ -53,6 +53,8 @@
 import org.cytoscape.model.CyIdentifiable;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
 
 import edu.ucsf.rbvi.enhancedcg.internal.charts.AbstractChartCustomGraphics;
 
@@ -91,7 +93,8 @@
        public Image getRenderedImage() { return null; }
 
        @Override 
-       public List<StripeLayer> getLayers(CyNetwork network, CyIdentifiable 
node) { 
+       public List<StripeLayer> getLayers(CyNetworkView networkView, View 
nodeView) { 
+               CyNetwork network = networkView.getModel();
                int nStripes = colorList.size();
                for (int stripe = 0; stripe < nStripes; stripe++) {
                        Color color = colorList.get(stripe);

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