Author: kono
Date: 2010-01-29 12:17:28 -0800 (Fri, 29 Jan 2010)
New Revision: 19072

Modified:
   cytoscape/trunk/src/cytoscape/data/readers/AbstractGraphReader.java
   cytoscape/trunk/src/cytoscape/data/readers/GMLReader.java
   cytoscape/trunk/src/cytoscape/data/readers/GraphReader.java
Log:
Deprecated layout() method removed.

Modified: cytoscape/trunk/src/cytoscape/data/readers/AbstractGraphReader.java
===================================================================
--- cytoscape/trunk/src/cytoscape/data/readers/AbstractGraphReader.java 
2010-01-29 19:53:58 UTC (rev 19071)
+++ cytoscape/trunk/src/cytoscape/data/readers/AbstractGraphReader.java 
2010-01-29 20:17:28 UTC (rev 19072)
@@ -143,10 +143,4 @@
        public void setTaskMonitor(TaskMonitor monitor) {
        }
 
-       /**
-        * @deprecated Use getLayoutAlgorithm().doLayout(view) instead. Will be 
removed 5/2008.
-        */
-       public void layout(GraphView view) {
-               getLayoutAlgorithm().doLayout((CyNetworkView)view);
-       }
 }

Modified: cytoscape/trunk/src/cytoscape/data/readers/GMLReader.java
===================================================================
--- cytoscape/trunk/src/cytoscape/data/readers/GMLReader.java   2010-01-29 
19:53:58 UTC (rev 19071)
+++ cytoscape/trunk/src/cytoscape/data/readers/GMLReader.java   2010-01-29 
20:17:28 UTC (rev 19072)
@@ -168,6 +168,7 @@
        IntArrayList nodes;
        IntArrayList sources;
        IntArrayList targets;
+       
        Vector node_labels;
        Vector edge_labels;
        Vector edge_root_index_pairs;
@@ -180,11 +181,8 @@
        private PercentUtil percentUtil;
 
        // Name for the new visual style
-       String styleName;
+       private String styleName;
 
-       // New Visual Style comverted from GML file.
-       //VisualStyle gmlstyle;
-
        // Hashes for node & edge attributes
        HashMap nodeW;
 
@@ -268,7 +266,7 @@
        }
 
        private String createVSName() {
-               return getNetworkName() + " Style";
+               return getNetworkName();
        }
 
        private void initializeHash() {
@@ -324,7 +322,7 @@
        /**
         * Returns a list containing the gml object tree
         */
-       public List getList() {
+       public List<KeyValue> getList() {
                return keyVals;
        }
 
@@ -452,22 +450,21 @@
        /**
         * This function takes the root level list which defines a gml objec 
tree
         */
-       protected void readGML(List list) {
+       @SuppressWarnings("unchecked")
+       protected void readGML(final List<KeyValue> list) {
                // Report Progress Message
                int counter = 0;
-
-               for (Iterator it = list.iterator(); it.hasNext();) {
+               final int size = list.size();
+               
+               for (KeyValue keyVal: list) {
                        // Report Progress Value
                        if (taskMonitor != null) {
-                               
taskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1, counter, 
list.size()));
+                               
taskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1, counter, size));
                                counter++;
                        }
 
-                       KeyValue keyVal = (KeyValue) it.next();
-
-                       if (keyVal.key.equals(GRAPH)) {
-                               readGraph((List) keyVal.value);
-                       }
+                       if (keyVal.key.equals(GRAPH))
+                               readGraph((List<KeyValue>) keyVal.value);
                }
        }
 
@@ -475,15 +472,14 @@
         * This function takes in a list which was given as the value to a 
"graph"
         * key underneath the main gml list
         */
+       @SuppressWarnings("unchecked")
        protected void readGraph(final List<KeyValue> list) {
                for (KeyValue keyVal: list) {
-                       if (keyVal.key.equals(NODE)) {
-                               readNode((List) keyVal.value);
-                       }
+                       if (keyVal.key.equals(NODE))
+                               readNode((List<KeyValue>) keyVal.value);
 
-                       if (keyVal.key.equals(EDGE)) {
-                               readEdge((List) keyVal.value);
-                       }
+                       if (keyVal.key.equals(EDGE))
+                               readEdge((List<KeyValue>) keyVal.value);
                }
        }
 

Modified: cytoscape/trunk/src/cytoscape/data/readers/GraphReader.java
===================================================================
--- cytoscape/trunk/src/cytoscape/data/readers/GraphReader.java 2010-01-29 
19:53:58 UTC (rev 19071)
+++ cytoscape/trunk/src/cytoscape/data/readers/GraphReader.java 2010-01-29 
20:17:28 UTC (rev 19072)
@@ -58,14 +58,6 @@
        public void read() throws IOException;
 
        /**
-        * Lays out the graph.
-        *
-        * @param myView
-        * @deprecated Use getLayoutAlgorithm().doLayout(view) instead. Will be 
removed 5/2008.
-        */
-       public void layout(GraphView myView);
-
-       /**
         * Returns the CyLayoutAlgorithm used to layout the graph
         *
         * @param myView

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