|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cytoscape.work.AbstractTask
org.cytoscape.view.layout.AbstractLayoutTask
org.cytoscape.view.layout.AbstractPartitionLayoutTask
public abstract class AbstractPartitionLayoutTask
This is a more helpful implementation of a LayoutAlgorithm Task that extends AbstractBasicLayoutTask and does the work of partitioning the CyNetworkView so that partitions may be laid out individually. 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.
Field Summary | |
---|---|
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. |
Fields inherited from class org.cytoscape.view.layout.AbstractLayoutTask |
---|
LAYOUT_ALGORITHM, layoutAttribute, networkView, nodesToLayOut, undo |
Fields inherited from class org.cytoscape.work.AbstractTask |
---|
cancelled |
Constructor Summary | |
---|---|
AbstractPartitionLayoutTask(String name,
boolean singlePartition,
CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut,
String layoutAttribute,
UndoSupport undo)
Creates a new AbstractPartitionLayoutTask object. |
Method Summary | |
---|---|
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 |
layoutPartion(LayoutPartition partition)
Override this method and layout the LayoutPartion just like you would a NetworkView. |
protected void |
setTaskStatus(int percent)
Used for |
Methods inherited from class org.cytoscape.view.layout.AbstractLayoutTask |
---|
run |
Methods inherited from class org.cytoscape.work.AbstractTask |
---|
cancel, insertTasksAfterCurrentTask, insertTasksAfterCurrentTask, setTaskIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public AbstractPartitionLayoutTask(String name, 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.Method Detail |
---|
public abstract void layoutPartion(LayoutPartition partition)
partition
- The LayoutPartion 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.
|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |