Author: thully
Date: 2012-11-08 15:32:31 -0800 (Thu, 08 Nov 2012)
New Revision: 30764
Added:
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java.edited
Modified:
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractLayoutTask.java
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayout.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayoutTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayout.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayoutTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithmTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayout.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayoutTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayoutTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayout.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayoutTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithmTask.java
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
core3/impl/trunk/layout-impl/src/test/java/org/cytoscape/view/layout/LayoutTaskTest.java
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapper.java
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapperTask.java
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayoutTask.java
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayout.java
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutTask.java
Log:
Show display name in layout tasks (fixed 1531)
Modified:
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractLayoutTask.java
===================================================================
---
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -31,7 +31,7 @@
private static final Logger logger =
LoggerFactory.getLogger(AbstractLayoutTask.class);
// Short name of this algorithm
- private final String name;
+ private final String displayName;
/**
* The table column name that provides the layout algorithm name.
@@ -67,7 +67,7 @@
/**
* Constructor.
*
- * @param name
+ * @param displayName
* The name of the layout algorithm.
* @param networkView
* The network view that the layout algorithm will be
applied to.
@@ -77,12 +77,12 @@
* The name of the attribute to use for the layout. May be
null
* or empty.
*/
- public AbstractLayoutTask(final String name, final CyNetworkView
networkView,
+ public AbstractLayoutTask(final String displayName, final CyNetworkView
networkView,
final Set<View<CyNode>> nodesToLayOut, final String
layoutAttribute, final UndoSupport undo) {
super();
this.networkView = networkView;
- this.name = name;
+ this.displayName = displayName;
this.undo = undo;
if (nodesToLayOut.size() == 0) {
@@ -103,8 +103,10 @@
*/
@Override
public final void run(final TaskMonitor taskMonitor) {
+ taskMonitor.setTitle(displayName);
+
final long start = System.currentTimeMillis();
- logger.debug("Layout Start: Algorithm = " + name);
+ logger.debug("Layout Start: Algorithm = " + displayName);
// do some sanity checking
if (networkView == null)
@@ -115,7 +117,7 @@
return;
if (undo != null)
- undo.postEdit(new LayoutEdit(name, networkView));
+ undo.postEdit(new LayoutEdit(displayName, networkView));
LayoutPoint centroid = null;
if (recenter)
@@ -136,7 +138,7 @@
if (netAttrsTable.getColumn(LAYOUT_ALGORITHM) == null)
netAttrsTable.createColumn(LAYOUT_ALGORITHM,
String.class, true);
- networkAttributes.set(LAYOUT_ALGORITHM, name);
+ networkAttributes.set(LAYOUT_ALGORITHM, displayName);
logger.debug("Layout finished in " +
(System.currentTimeMillis() - start) + " msec.");
}
Modified:
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
===================================================================
---
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -75,13 +75,13 @@
* @param layoutAttribute the name of the attribute to use for this
layout.
* Allowed to be empty or null.
*/
- public AbstractPartitionLayoutTask(final String name,
+ public AbstractPartitionLayoutTask(final String displayName,
final boolean singlePartition,
CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut,
String layoutAttribute,
UndoSupport undo) {
- super(name, networkView, nodesToLayOut, layoutAttribute, undo);
+ super(displayName, networkView, nodesToLayOut, layoutAttribute,
undo);
this.singlePartition = singlePartition;
}
Modified:
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
===================================================================
---
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/api/trunk/layout-api/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -112,4 +112,10 @@
* @return The computer-readable name of the layout.
*/
String getName();
+
+ /**
+ * Returns the human-readable name of the layout.
+ * @return The human-readable name of the layout.
+ */
+ String toString();
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayout.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -69,7 +69,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new
GroupAttributesLayoutTask(getName(), networkView, nodesToLayOut,
(GroupAttributesLayoutContext)context, attrName, undoSupport));
+ return new TaskIterator(new
GroupAttributesLayoutTask(toString(), networkView, nodesToLayOut,
(GroupAttributesLayoutContext)context, attrName, undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/GroupAttributesLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -31,8 +31,8 @@
private GroupAttributesLayoutContext context;
- public GroupAttributesLayoutTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, GroupAttributesLayoutContext
context, String attrName, UndoSupport undo) {
- super(name, networkView, nodesToLayOut, attrName, undo);
+ public GroupAttributesLayoutTask(final String displayName,
CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut,
GroupAttributesLayoutContext context, String attrName, UndoSupport undo) {
+ super(displayName, networkView, nodesToLayOut, attrName, undo);
this.context = context;
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayout.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -51,7 +51,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attr) {
- return new TaskIterator(new StackedNodeLayoutTask(getName(),
networkView, (StackedNodeLayoutContext)context, nodesToLayOut,
attr,undoSupport));
+ return new TaskIterator(new StackedNodeLayoutTask(toString(),
networkView, (StackedNodeLayoutContext)context, nodesToLayOut,
attr,undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/StackedNodeLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -14,8 +14,8 @@
private StackedNodeLayoutContext context;
- public StackedNodeLayoutTask(final String name, CyNetworkView
networkView, final StackedNodeLayoutContext context, Set<View<CyNode>>
nodesToLayOut, String attr, UndoSupport undo) {
- super(name, networkView, nodesToLayOut, attr, undo);
+ public StackedNodeLayoutTask(final String displayName, CyNetworkView
networkView, final StackedNodeLayoutContext context, Set<View<CyNode>>
nodesToLayOut, String attr, UndoSupport undo) {
+ super(displayName, networkView, nodesToLayOut, attr, undo);
this.context = context;
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -63,8 +63,8 @@
/**
* This is the constructor for the bioLayout algorithm.
*/
- public BioLayoutAlgorithmTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final boolean singlePartition,
String attrName, UndoSupport undo) {
- super(name, singlePartition, networkView,
nodesToLayOut,attrName, undo);
+ public BioLayoutAlgorithmTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final boolean singlePartition,
String attrName, UndoSupport undo) {
+ super(displayName, singlePartition, networkView,
nodesToLayOut,attrName, undo);
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -65,7 +65,7 @@
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
return new TaskIterator(
- new BioLayoutFRAlgorithmTask(getName(), networkView,
nodesToLayOut, (BioLayoutFRContext)context, supportWeights, attrName,
undoSupport));
+ new BioLayoutFRAlgorithmTask(toString(), networkView,
nodesToLayOut, (BioLayoutFRContext)context, supportWeights, attrName,
undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -65,8 +65,8 @@
Profile updateProfile;
*/
- public BioLayoutFRAlgorithmTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final BioLayoutFRContext context,
final boolean supportWeights, String attrName, UndoSupport undo) {
- super(name, networkView, nodesToLayOut,
context.singlePartition, attrName, undo);
+ public BioLayoutFRAlgorithmTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final BioLayoutFRContext context,
final boolean supportWeights, String attrName, UndoSupport undo) {
+ super(displayName, networkView, nodesToLayOut,
context.singlePartition, attrName, undo);
this.context = context;
this.supportWeights =supportWeights;
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -68,7 +68,7 @@
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
return new TaskIterator(
- new BioLayoutKKAlgorithmTask(getName(), networkView,
nodesToLayOut, (BioLayoutKKContext)context, supportWeights, attrName,
undoSupport));
+ new BioLayoutKKAlgorithmTask(toString(), networkView,
nodesToLayOut, (BioLayoutKKContext)context, supportWeights, attrName,
undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -100,8 +100,8 @@
* @param supportEdgeWeights a boolean to indicate whether we should
* behave as if we
support weights
*/
- public BioLayoutKKAlgorithmTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final BioLayoutKKContext context,
final boolean supportWeights, String attrName, UndoSupport undo) {
- super(name, networkView, nodesToLayOut,
context.singlePartition, attrName, undo);
+ public BioLayoutKKAlgorithmTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final BioLayoutKKContext context,
final boolean supportWeights, String attrName, UndoSupport undo) {
+ super(displayName, networkView, nodesToLayOut,
context.singlePartition, attrName, undo);
this.context = context;
this.supportWeights = supportWeights;
this.m_layoutPass = context.m_layoutPass;
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -21,7 +21,7 @@
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new
CircularLayoutAlgorithmTask(getName(), networkView, nodesToLayOut,
(CircularLayoutContext)context, undoSupport));
+ return new TaskIterator(new
CircularLayoutAlgorithmTask(toString(), networkView, nodesToLayOut,
(CircularLayoutContext)context, undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithmTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/circularLayout/CircularLayoutAlgorithmTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -34,8 +34,8 @@
private boolean[] drawnBiComps;
- public CircularLayoutAlgorithmTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, CircularLayoutContext context,
UndoSupport undo) {
- super(name, context.singlePartition, networkView,
nodesToLayOut,"", undo);
+ public CircularLayoutAlgorithmTask(final String displayName,
CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut,
CircularLayoutContext context, UndoSupport undo) {
+ super(displayName, context.singlePartition, networkView,
nodesToLayOut,"", undo);
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayout.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -70,7 +70,7 @@
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new
AttributeCircleLayoutTask(getName(), networkView, nodesToLayOut,
(AttributeCircleLayoutContext)context, attrName, undoSupport));
+ return new TaskIterator(new
AttributeCircleLayoutTask(toString(), networkView, nodesToLayOut,
(AttributeCircleLayoutContext)context, attrName, undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/AttributeCircleLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -23,8 +23,8 @@
/**
* Creates a new ForceDirectedLayout object.
*/
- public AttributeCircleLayoutTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, final
AttributeCircleLayoutContext context, String attrName, UndoSupport undo) {
- super(name, context.singlePartition, networkView,
nodesToLayOut,attrName, undo);
+ public AttributeCircleLayoutTask(final String displayName,
CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut, final
AttributeCircleLayoutContext context, String attrName, UndoSupport undo) {
+ super(displayName, context.singlePartition, networkView,
nodesToLayOut,attrName, undo);
this.context = context;
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -20,7 +20,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new
DegreeSortedCircleLayoutTask(getName(), networkView, nodesToLayOut,
(DegreeSortedCircleContext)context, attrName, undoSupport));
+ return new TaskIterator(new
DegreeSortedCircleLayoutTask(toString(), networkView, nodesToLayOut,
(DegreeSortedCircleContext)context, attrName, undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/DegreeSortedCircleLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -26,9 +26,9 @@
/**
* Creates a new GridNodeLayout object.
*/
- public DegreeSortedCircleLayoutTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut,
+ public DegreeSortedCircleLayoutTask(final String displayName,
CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut,
DegreeSortedCircleContext context, String attrName,
UndoSupport undo) {
- super(name, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
+ super(displayName, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
this.network = networkView.getModel();
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayout.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -23,7 +23,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut,String attrName) {
- return new TaskIterator(new ISOMLayoutTask(getName(),
networkView, nodesToLayOut, (ISOMLayoutContext) context, attrName,
undoSupport));
+ return new TaskIterator(new ISOMLayoutTask(toString(),
networkView, nodesToLayOut, (ISOMLayoutContext) context, attrName,
undoSupport));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -38,8 +38,8 @@
CyNetwork network;
private ISOMLayoutContext context;
- public ISOMLayoutTask(final String name, CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut, ISOMLayoutContext context, String attrName,
UndoSupport undo) {
- super(name, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
+ public ISOMLayoutTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, ISOMLayoutContext context, String
attrName, UndoSupport undo) {
+ super(displayName, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
this.context = context;
network = networkView.getModel();
q = new LongArrayList();
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -89,7 +89,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new
HierarchicalLayoutAlgorithmTask(getName(), networkView,
nodesToLayOut,(HierarchicalLayoutContext) context, attrName,
undoSupport,hf,bf));
+ return new TaskIterator(new
HierarchicalLayoutAlgorithmTask(toString(), networkView,
nodesToLayOut,(HierarchicalLayoutContext) context, attrName,
undoSupport,hf,bf));
}
@Override
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithmTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithmTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -39,11 +39,11 @@
/**
* Creates a new GridNodeLayout object.
*/
- public HierarchicalLayoutAlgorithmTask(final String name, CyNetworkView
networkView,
+ public HierarchicalLayoutAlgorithmTask(final String displayName,
CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut,
HierarchicalLayoutContext context,
String attrName, UndoSupport undo, HandleFactory handleFactory,
BendFactory bendFactory) {
- super(name, networkView, nodesToLayOut, attrName, undo);
+ super(displayName, networkView, nodesToLayOut, attrName, undo);
this.context = context;
this.handleFactory = handleFactory;
this.bendFactory = bendFactory;
Modified:
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
===================================================================
---
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -55,7 +55,7 @@
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut,
String attrName) {
- return new TaskIterator(new GridNodeLayoutTask(getName(),
networkView, nodesToLayOut,
+ return new TaskIterator(new GridNodeLayoutTask(toString(),
networkView, nodesToLayOut,
(GridNodeLayoutContext) context, attrName,
undoSupport));
}
Added:
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java.edited
===================================================================
---
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java.edited
(rev 0)
+++
core3/impl/trunk/layout-impl/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java.edited
2012-11-08 23:32:31 UTC (rev 30764)
@@ -0,0 +1,77 @@
+/*
+ File: GridNodeLayout.java
+
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+package org.cytoscape.view.layout.internal.algorithms;
+
+import java.util.Set;
+
+import org.cytoscape.model.CyNode;
+import org.cytoscape.view.layout.AbstractLayoutAlgorithm;
+import org.cytoscape.view.layout.CyLayoutAlgorithmManager;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
+import org.cytoscape.work.TaskIterator;
+import org.cytoscape.work.undo.UndoSupport;
+
+/**
+ * The GridNodeLayout provides a very simple layout, suitable as the default
+ * layout for Cytoscape data readers.
+ */
+public class GridNodeLayout extends AbstractLayoutAlgorithm {
+
+ /**
+ * Creates a new GridNodeLayout object.
+ */
+ public GridNodeLayout(UndoSupport undoSupport) {
+ super(CyLayoutAlgorithmManager.DEFAULT_LAYOUT_NAME, "Grid
Layout", undoSupport);
+ }
+
+ @Override
+<<<<<<< .mine
+ public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
+ return new TaskIterator(new GridNodeLayoutTask(toString(),
networkView, nodesToLayOut, (GridNodeLayoutContext)context, attrName,
undoSupport));
+=======
+ public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut,
+ String attrName) {
+ return new TaskIterator(new GridNodeLayoutTask(getName(),
networkView, nodesToLayOut,
+ (GridNodeLayoutContext) context, attrName,
undoSupport));
+>>>>>>> .r30763
+ }
+
+ @Override
+ public Object createLayoutContext() {
+ return new GridNodeLayoutContext();
+ }
+
+ @Override
+ public boolean getSupportsSelectedOnly() {
+ return true;
+ }
+
+}
Modified:
core3/impl/trunk/layout-impl/src/test/java/org/cytoscape/view/layout/LayoutTaskTest.java
===================================================================
---
core3/impl/trunk/layout-impl/src/test/java/org/cytoscape/view/layout/LayoutTaskTest.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-impl/src/test/java/org/cytoscape/view/layout/LayoutTaskTest.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -45,12 +45,12 @@
private static final class DummyLayoutTask extends AbstractLayoutTask {
- public DummyLayoutTask(String name, CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut) {
- super(name, networkView, nodesToLayOut,"",
mock(UndoSupport.class));
+ public DummyLayoutTask(String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut) {
+ super(displayName, networkView, nodesToLayOut,"",
mock(UndoSupport.class));
}
- public DummyLayoutTask(String name, CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut, String attr) {
- super(name, networkView, nodesToLayOut,"",
mock(UndoSupport.class));
+ public DummyLayoutTask(String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, String attr) {
+ super(displayName, networkView, nodesToLayOut,"",
mock(UndoSupport.class));
}
Modified:
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapper.java
===================================================================
---
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapper.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapper.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -90,7 +90,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new JGraphLayoutWrapperTask(getName(),
networkView, nodesToLayOut, context, layout, layoutSettings, undoSupport));
+ return new TaskIterator(new JGraphLayoutWrapperTask(toString(),
networkView, nodesToLayOut, context, layout, layoutSettings, undoSupport));
}
/**
Modified:
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapperTask.java
===================================================================
---
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapperTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-jgraph-impl/src/main/java/csapps/layout/JGraphLayoutWrapperTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -44,9 +44,9 @@
/**
* Creates a new GridNodeLayout object.
*/
- public JGraphLayoutWrapperTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, Object context,
JGraphLayoutAlgorithm layout, JGraphLayoutSettings layoutSettings, UndoSupport
undo)
+ public JGraphLayoutWrapperTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut, Object context,
JGraphLayoutAlgorithm layout, JGraphLayoutSettings layoutSettings, UndoSupport
undo)
{
- super(name, networkView, nodesToLayOut,"", undo);
+ super(displayName, networkView, nodesToLayOut,"", undo);
this.layoutSettings = layoutSettings;
this.layout = layout;
Modified:
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
===================================================================
---
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -50,7 +50,7 @@
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut,
String attrName) {
- return new TaskIterator(new ForceDirectedLayoutTask(getName(),
networkView, nodesToLayOut,
+ return new TaskIterator(new ForceDirectedLayoutTask(toString(),
networkView, nodesToLayOut,
(ForceDirectedLayoutContext) context,
integrator, attrName, undoSupport));
}
Modified:
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayoutTask.java
===================================================================
---
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/impl/trunk/layout-prefuse-impl/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -65,10 +65,10 @@
/**
* Creates a new ForceDirectedLayout object.
*/
- public ForceDirectedLayoutTask(final String name, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut,
+ public ForceDirectedLayoutTask(final String displayName, CyNetworkView
networkView, Set<View<CyNode>> nodesToLayOut,
final ForceDirectedLayoutContext context, final
ForceDirectedLayout.Integrators integrator,
String attrName, UndoSupport undo) {
- super(name, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
+ super(displayName, context.singlePartition, networkView,
nodesToLayOut, attrName, undo);
this.context = context;
this.integrator = integrator;
Modified:
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayout.java
===================================================================
---
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayout.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayout.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -20,7 +20,7 @@
}
public TaskIterator createTaskIterator(CyNetworkView networkView,
Object context, Set<View<CyNode>> nodesToLayOut, String attrName) {
- return new TaskIterator(new MyLayoutTask(getName(),
networkView, (MyLayoutContext)context, nodesToLayOut,attrName, undoSupport));
+ return new TaskIterator(new MyLayoutTask(toString(),
networkView, (MyLayoutContext)context, nodesToLayOut,attrName, undoSupport));
}
public Object createLayoutContext() {
Modified:
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutTask.java
===================================================================
---
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutTask.java
2012-11-08 22:24:48 UTC (rev 30763)
+++
core3/samples/trunk/sample18/src/main/java/org/cytoscape/sample/internal/MyLayoutTask.java
2012-11-08 23:32:31 UTC (rev 30764)
@@ -17,8 +17,8 @@
private int XRange;
private int YRange;
- public MyLayoutTask(final String name, CyNetworkView networkView, final
MyLayoutContext context, Set<View<CyNode>> nodesToLayOut, String attrName,
UndoSupport undo) {
- super(name, networkView, nodesToLayOut, attrName, undo);
+ public MyLayoutTask(final String displayName, CyNetworkView
networkView, final MyLayoutContext context, Set<View<CyNode>> nodesToLayOut,
String attrName, UndoSupport undo) {
+ super(displayName, networkView, nodesToLayOut, attrName, undo);
this.XRange = context.XRange;
this.YRange = context.YRange;
--
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.