Package org.cytoscape.view.layout
Class AbstractParallelPartitionLayoutTask
java.lang.Object
org.cytoscape.work.AbstractTask
org.cytoscape.view.layout.AbstractLayoutTask
org.cytoscape.view.layout.AbstractPartitionLayoutTask
org.cytoscape.view.layout.AbstractParallelPartitionLayoutTask
- All Implemented Interfaces:
Task
This is an even more helpful implementation of a LayoutAlgorithm Task
that extends AbstractPartitionLayoutTask and does the work of partitioning
the CyNetworkView so that partitions may be laid out individually.
The layout is applied to multiple partitions in parallel.
Extensions of this class are meant to implement the layoutPartition()
method and operate on the LayoutParition object that is passed to that
method as an argument. Extensions should also make sure everything is thread-safe.
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
Module: layout-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>layout-api</artifactId> </dependency>
-
Field Summary
Fields inherited from class org.cytoscape.view.layout.AbstractPartitionLayoutTask
current_size, current_start, edgeWeighter, incr, logger, partitionList, taskMonitor, total_nodes
Fields inherited from class org.cytoscape.view.layout.AbstractLayoutTask
LAYOUT_ALGORITHM, layoutAttribute, networkView, nodesToLayOut, recenter, undo
Fields inherited from class org.cytoscape.work.AbstractTask
cancelled
-
Constructor Summary
ConstructorDescriptionAbstractParallelPartitionLayoutTask
(String displayName, boolean singlePartition, CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut, String layoutAttribute, UndoSupport undo) Creates a new AbstractPartitionLayoutTask object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doLayout
(TaskMonitor taskMonitor) AbstractGraphPartitionLayout implements the doLayout method of AbstractBasicLayout in which it calls the layoutParition method on each LayoutPartition object created for the network.Methods inherited from class org.cytoscape.view.layout.AbstractPartitionLayoutTask
calculate_max_dimension, layoutPartition, setTaskStatus
Methods inherited from class org.cytoscape.view.layout.AbstractLayoutTask
run
Methods inherited from class org.cytoscape.work.AbstractTask
cancel, getTaskIterator, insertTasksAfterCurrentTask, insertTasksAfterCurrentTask, setTaskIterator
-
Constructor Details
-
AbstractParallelPartitionLayoutTask
public AbstractParallelPartitionLayoutTask(String displayName, boolean singlePartition, CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut, String layoutAttribute, UndoSupport undo) Creates a new AbstractPartitionLayoutTask object.- Parameters:
name
- The name of the layout algorithm.singlePartition
- Whether this layout algorithm should execute on a single partition instead of multiple partitions.networkView
- the CyNetworkView being partitioned.nodesToLayOut
- the set of nodes to layout.layoutAttribute
- the name of the attribute to use for this layout. Allowed to be empty or null.
-
-
Method Details
-
doLayout
AbstractGraphPartitionLayout implements the doLayout method of AbstractBasicLayout in which it calls the layoutParition method on each LayoutPartition object created for the network.- Overrides:
doLayout
in classAbstractPartitionLayoutTask
- Parameters:
taskMonitor
- the TaskMonitor provided by the run() method of the Task.
-