Author: ghuck
Date: 2010-09-09 08:38:15 -0700 (Thu, 09 Sep 2010)
New Revision: 21752
Modified:
coreplugins/trunk/AutomaticLayout/src/main/java/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
Log:
Moved resetLabelPosition to AbstractLayout class.
Modified:
coreplugins/trunk/AutomaticLayout/src/main/java/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
===================================================================
---
coreplugins/trunk/AutomaticLayout/src/main/java/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
2010-09-09 15:35:15 UTC (rev 21751)
+++
coreplugins/trunk/AutomaticLayout/src/main/java/csplugins/layout/algorithms/graphPartition/AbstractGraphPartition.java
2010-09-09 15:38:15 UTC (rev 21752)
@@ -1,3 +1,4 @@
+/* vim: set ts=2: */
/**
* Copyright (C) Gerardo Huck, 2010
*
@@ -25,7 +26,6 @@
*/
-/* vim: set ts=2: */
package csplugins.layout.algorithms.graphPartition;
import cern.colt.list.*;
@@ -201,12 +201,6 @@
public void construct() {
initialize();
- // Reset label positions if necessary
- if (resetPosition) {
- resetLabelPositions();
- return;
- }
-
if (edgeWeighter != null)
edgeWeighter.reset();
@@ -389,7 +383,6 @@
} else { // normal (non-label) layout
- resetLabelPositions();
layoutPartition(partition);
}
@@ -441,29 +434,4 @@
}
- /**
- * Moves labels to the same position in which their parent nodes are
- */
- protected void resetLabelPositions() {
-
- logger.info("Reseting labels position");
-
- CyAttributes nodeAtts = Cytoscape.getNodeAttributes();
- Collection<CyNode> selectedNodes =
(Collection<CyNode>)network.getSelectedNodes();
-
- // Go through all nodes deleting the label position attribute
- for (CyNode node: (List<CyNode>)network.nodesList()) {
- if (!selectedOnly || selectedNodes.contains(node) )
- if (nodeAtts.hasAttribute(node.getIdentifier(),
"node.labelPosition")) {
- nodeAtts.deleteAttribute(node.getIdentifier(),
"node.labelPosition");
- // logger.info("Deleted label position attribute of node: "
+ node.toString() );
- }
- }
-
- // redraw the network so that the new label positions are visible
- networkView.updateView();
- networkView.redrawGraph(true, true);
- }
-
-
}
--
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.