public abstract class AbstractPartitionLayoutTask extends AbstractLayoutTask
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>
Modifier and Type | Field and Description |
---|---|
protected double |
current_size
Partition size used for taskMonitor.
|
protected double |
current_start
Starting node number used for taskMonitor.
|
protected EdgeWeighter |
edgeWeighter
The EdgeWeighter used for edge weight calculations.
|
protected double |
incr
The value used for spacing nodes.
|
protected List<LayoutPartition> |
partitionList
The list of LayoutPartition objects that get laid out.
|
protected TaskMonitor |
taskMonitor
The TaskMonitor initially set in the run method of the task.
|
protected double |
total_nodes
Total number of nodes used for taskMonitor.
|
LAYOUT_ALGORITHM, layoutAttribute, networkView, nodesToLayOut, recenter, undo
cancelled
Constructor and Description |
---|
AbstractPartitionLayoutTask(String displayName,
boolean singlePartition,
CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut,
String layoutAttribute,
UndoSupport undo)
Creates a new AbstractPartitionLayoutTask object.
|
Modifier and Type | Method and Description |
---|---|
void |
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.
|
abstract void |
layoutPartition(LayoutPartition partition)
Override this method and layout the LayoutPartion just
like you would a NetworkView.
|
protected void |
setTaskStatus(int percent)
Used for
|
run
cancel, insertTasksAfterCurrentTask, insertTasksAfterCurrentTask, setTaskIterator
protected TaskMonitor taskMonitor
protected double incr
protected List<LayoutPartition> partitionList
protected EdgeWeighter edgeWeighter
protected double current_start
protected double current_size
protected double total_nodes
public AbstractPartitionLayoutTask(String displayName, boolean singlePartition, CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut, String layoutAttribute, UndoSupport undo)
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.public abstract void layoutPartition(LayoutPartition partition)
partition
- The LayoutPartition to be laid out.protected void setTaskStatus(int percent)
percent
- The percentage of completion for this partition. Value must be between 0 and 100.public void doLayout(TaskMonitor taskMonitor)
doLayout
in class AbstractLayoutTask
taskMonitor
- the TaskMonitor provided by the run() method
of the Task.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.