Author: kono
Date: 2010-08-10 11:17:16 -0700 (Tue, 10 Aug 2010)
New Revision: 21282

Modified:
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/Layout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
Log:
Method name changed from getSource() to getModel() for consistency.

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/Layout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/Layout.java
      2010-08-10 17:49:08 UTC (rev 21281)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/Layout.java
      2010-08-10 18:17:16 UTC (rev 21282)
@@ -70,7 +70,7 @@
         * @param load_current_values  DOCUMENT ME!
         */
        public Layout(CyNetworkView view, boolean load_current_values) {
-               this(view.getSource());
+               this(view.getModel());
 
                // initialize current values
                if (load_current_values) {
@@ -149,7 +149,7 @@
         * @return  DOCUMENT ME!
         */
        public boolean setX(View<CyNode> node, double x) {
-               return nodeXMap.put(node.getSource().getIndex(), x);
+               return nodeXMap.put(node.getModel().getIndex(), x);
        }
 
        /**
@@ -161,7 +161,7 @@
         * @return  DOCUMENT ME!
         */
        public boolean setY(View<CyNode> node, double y) {
-               return nodeYMap.put(node.getSource().getIndex(), y);
+               return nodeYMap.put(node.getModel().getIndex(), y);
        }
 
        // get
@@ -217,7 +217,7 @@
         * @return  DOCUMENT ME!
         */
        public double getX(View<CyNode> node) {
-               return nodeXMap.get(node.getSource().getIndex());
+               return nodeXMap.get(node.getModel().getIndex());
        }
 
        /**
@@ -228,6 +228,6 @@
         * @return  DOCUMENT ME!
         */
        public double getY(View<CyNode> node) {
-               return nodeYMap.get(node.getSource().getIndex());
+               return nodeYMap.get(node.getModel().getIndex());
        }
 }

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
     2010-08-10 17:49:08 UTC (rev 21281)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
     2010-08-10 18:17:16 UTC (rev 21282)
@@ -324,7 +324,7 @@
                        for (View<CyNode> nv: networkView.getNodeViews()){
                            if (canceled)
                                return;
-                           index2NodeView.put(nv.getSource().getIndex(), nv);
+                           index2NodeView.put(nv.getModel().getIndex(), nv);
                        }
 
                }
@@ -338,8 +338,8 @@
                for (View<CyEdge> ev: networkView.getEdgeViews()){
                    // FIXME: much better would be to query adjacent edges of 
selected nodes...
                    
-                       Integer edgeFrom = 
ev.getSource().getSource().getIndex();
-                       Integer edgeTo = ev.getSource().getTarget().getIndex();
+                       Integer edgeFrom = ev.getModel().getSource().getIndex();
+                       Integer edgeTo = ev.getModel().getTarget().getIndex();
 
                        if ((edgeFrom == null) || (edgeTo == null)) {
                                // Must be from an unselected node
@@ -723,8 +723,8 @@
 
                /* Map edges to edge views in order to map dummy nodes to edge 
bends properly */
                for (View<CyEdge>ev: networkView.getEdgeViews()){
-                       Integer edgeFrom = 
ev.getSource().getSource().getIndex();
-                       Integer edgeTo = ev.getSource().getTarget().getIndex();
+                       Integer edgeFrom = ev.getModel().getSource().getIndex();
+                       Integer edgeTo = ev.getModel().getTarget().getIndex();
 
                        if ((edgeFrom == null) || (edgeTo == null)) {
                                // Must be from an unselected node
@@ -772,8 +772,8 @@
                                View<CyEdge> ev = 
myEdges2EdgeViews[cI[node.graphIndex]].get(theEdge);
 
                                if (ev != null) {
-                                       int source = 
ev.getSource().getSource().getIndex();
-                                       int target = 
ev.getSource().getTarget().getIndex();
+                                       int source = 
ev.getModel().getSource().getIndex();
+                                       int target = 
ev.getModel().getTarget().getIndex();
                                        double k = 
(getYPositionOf(index2NodeView, target) - getYPositionOf(index2NodeView, 
source)) / (
                                                        
getXPositionOf(index2NodeView, target) - getXPositionOf(index2NodeView, 
source));
 

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