Author: kono
Date: 2011-07-07 15:44:44 -0700 (Thu, 07 Jul 2011)
New Revision: 26107
Modified:
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/layout/ApplyPreferredLayoutTask.java
Log:
Source code re-formatted because it was broken. NO FUNCTIONAL CHANGE.
Modified:
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/layout/ApplyPreferredLayoutTask.java
===================================================================
---
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/layout/ApplyPreferredLayoutTask.java
2011-07-07 22:16:48 UTC (rev 26106)
+++
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/layout/ApplyPreferredLayoutTask.java
2011-07-07 22:44:44 UTC (rev 26107)
@@ -36,27 +36,27 @@
import java.util.Properties;
public class ApplyPreferredLayoutTask extends AbstractNetworkViewTask {
-
- private static final String DEF_LAYOUT = "force-directed";
- private final Properties props;
- private final CyLayoutAlgorithmManager layouts;
+ private static final String DEF_LAYOUT = "force-directed";
- public ApplyPreferredLayoutTask(CyNetworkView v, CyLayoutAlgorithmManager
layouts, Properties props) {
- super(v);
- this.layouts = layouts;
- this.props = props;
- }
+ private final Properties props;
+ private final CyLayoutAlgorithmManager layouts;
- public void run(TaskMonitor tm) {
- final String pref = props.getProperty("preferredLayoutAlgorithm",
DEF_LAYOUT);
- final CyLayoutAlgorithm layout = layouts.getLayout(pref);
-
- if (layout != null) {
- layout.setNetworkView(view);
- insertTasksAfterCurrentTask(layout.getTaskIterator());
- } else {
- throw new IllegalArgumentException("Couldn't find layout algorithm:
" + pref);
+ public ApplyPreferredLayoutTask(CyNetworkView v,
CyLayoutAlgorithmManager layouts, Properties props) {
+ super(v);
+ this.layouts = layouts;
+ this.props = props;
}
- }
+
+ public void run(TaskMonitor tm) {
+ final String pref =
props.getProperty("preferredLayoutAlgorithm", DEF_LAYOUT);
+ final CyLayoutAlgorithm layout = layouts.getLayout(pref);
+
+ if (layout != null) {
+ layout.setNetworkView(view);
+ insertTasksAfterCurrentTask(layout.getTaskIterator());
+ } else {
+ throw new IllegalArgumentException("Couldn't find
layout algorithm: " + pref);
+ }
+ }
}
--
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.