Author: ghuck
Date: 2010-07-29 12:05:24 -0700 (Thu, 29 Jul 2010)
New Revision: 21081

Modified:
   
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
   
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
Log:


Modified: 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
===================================================================
--- 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
      2010-07-29 18:39:23 UTC (rev 21080)
+++ 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
      2010-07-29 19:05:24 UTC (rev 21081)
@@ -80,8 +80,8 @@
            lp = new ObjectPositionImpl();
            // logger.info("Created new ObjectPosition!");
        } else {
-           ValueParser<ObjectPosition> parser = 
-               (ValueParser<ObjectPosition>) 
VisualPropertyType.NODE_LABEL_POSITION.getValueParser();
+           ObjectPositionParser parser = 
+               (ObjectPositionParser) 
VisualPropertyType.NODE_LABEL_POSITION.getValueParser();
            lp = parser.parseStringValue(labelPosition);
            // logger.info("ObjectPosition succesfully parsed!");
        }

Modified: 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
===================================================================
--- 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
 2010-07-29 18:39:23 UTC (rev 21080)
+++ 
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
 2010-07-29 19:05:24 UTC (rev 21081)
@@ -196,6 +196,8 @@
        }
 
        total_nodes = network.getNodeCount();
+       logger.info("TOTAL NODES: " + total_nodes);     
+
        current_start = 0;
 
        // Set up offsets -- we start with the overall min and max
@@ -220,7 +222,7 @@
            if (canceled) break;
            // get the partition
            current_size = (double)partition.size();
-           // logger.debug("Partition #"+partition.getPartitionNumber()+" has 
"+current_size+" nodes");
+           logger.info("Partition #"+partition.getPartitionNumber()+" has 
"+current_size+" nodes");
            setTaskStatus(1);
 
            // Partitions Requiring Layout
@@ -252,6 +254,7 @@
                node.setLocation(next_x_start, next_y_start);
                partition.moveNodeToLocation(node);
            } else {
+               logger.info("Done nothing with this partition");
                continue;
            }
 
@@ -297,14 +300,16 @@
 
            //  logger.info("New partition succesfully created!");
 
+           newPartition.recalculateStatistics();
+
            // Figure out our starting point - This will be used when:
            // 1- Laying out labels off all nodes
            // - and- 
            // 2- (normal) Nodes are not allowed to move
-           if (selectedOnly && moveNodes) {
-               newPartition.recalculateStatistics();
-               initialLocation = newPartition.getAverageLocation();
-           }
+//          if (selectedOnly && moveNodes) {
+//             newPartition.recalculateStatistics();
+//             initialLocation = newPartition.getAverageLocation();
+//         }
 
            if (canceled)
                return;
@@ -321,26 +326,26 @@
            // - and - 
            // 2- (normal) Nodes are allowed to move
 
-           taskMonitor.setStatus("Making final arrangements to partition...");
+           // taskMonitor.setStatus("Making final arrangements to 
partition...");
 
-           if (selectedOnly && moveNodes) {
-               // logger.info("moving back labels (and possibly nodes) to 
their location");
+//         if (selectedOnly && moveNodes) {
+//             // logger.info("moving back labels (and possibly nodes) to 
their location");
 
-               newPartition.recalculateStatistics();
-               Dimension finalLocation = newPartition.getAverageLocation();
-               double xDelta = 0.0;
-               double yDelta = 0.0;
+//             newPartition.recalculateStatistics();
+//             Dimension finalLocation = newPartition.getAverageLocation();
+//             double xDelta = 0.0;
+//             double yDelta = 0.0;
         
-               xDelta = finalLocation.getWidth() - initialLocation.getWidth();
-               yDelta = finalLocation.getHeight() - 
initialLocation.getHeight();
+//             xDelta = finalLocation.getWidth() - initialLocation.getWidth();
+//             yDelta = finalLocation.getHeight() - 
initialLocation.getHeight();
 
-               for (LayoutNode v: newPartition.getNodeList()) {
-                   if (!v.isLocked()) {
-                       v.decrement(xDelta, yDelta);
-                       newPartition.moveNodeToLocation(v);
-                   }
-               }
-           }
+//             for (LayoutNode v: newPartition.getNodeList()) {
+//                 if (!v.isLocked()) {
+//                     v.decrement(xDelta, yDelta);
+//                     newPartition.moveNodeToLocation(v);
+//                 }
+//             }
+//         }
 
 
            // make sure nodes are where they should be
@@ -350,7 +355,7 @@
                    return;
 
                node.moveToLocation();
-               logger.info( node.toString() );
+               // logger.info( node.toString() );
            }
 
            // make sure that all labels are where they should be 
@@ -360,7 +365,7 @@
                    return;
 
                node.moveToLocation();
-               logger.info( node.toString() );
+               // logger.info( node.toString() );
            }
 
            taskMonitor.setStatus("Updating Display...");

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