|
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
public abstract class AbstractLayoutTask
This is a basic implementation of a LayoutAlgorithm Task that does some bookkeeping, but primarily delegates to the doLayout() method. Extensions of this class are meant to operate on the CyNetworkView provided to the constructor (and is available as a protected member variable).
Field Summary | |
---|---|
protected static String |
LAYOUT_ALGORITHM
The table column name that provides the layout algorithm name. |
protected String |
layoutAttribute
The attribute to be used for this layout. |
protected CyNetworkView |
networkView
The network view that the layout will be applied to. |
protected Set<View<CyNode>> |
nodesToLayOut
The node views that will be laid out by the algorithm. |
protected UndoSupport |
undo
Undo support for the task. |
Fields inherited from class org.cytoscape.work.AbstractTask |
---|
cancelled |
Constructor Summary | |
---|---|
AbstractLayoutTask(String name,
CyNetworkView networkView,
Set<View<CyNode>> nodesToLayOut,
String layoutAttribute,
UndoSupport undo)
Constructor. |
Method Summary | |
---|---|
protected abstract void |
doLayout(TaskMonitor taskMonitor)
This method is designed to actually encapsulate the layout algorithm. |
void |
run(TaskMonitor taskMonitor)
This method is called when the Task begins execution. |
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 static final String LAYOUT_ALGORITHM
protected final CyNetworkView networkView
protected final Set<View<CyNode>> nodesToLayOut
protected final String layoutAttribute
protected final UndoSupport undo
Constructor Detail |
---|
public AbstractLayoutTask(String name, CyNetworkView networkView, Set<View<CyNode>> nodesToLayOut, String layoutAttribute, UndoSupport undo)
name
- The name of the layout algorithm.networkView
- The network view that the layout algorithm will be applied to.nodesToLayOut
- The set of nodes to be laid out.layoutAttribute
- The name of the attribute to use for the layout. May be null or empty.Method Detail |
---|
public final void run(TaskMonitor taskMonitor)
Task
begins execution.
This method should not be called by the programmer, as it will be called by the TaskManager
.
run
in interface Task
run
in class AbstractTask
taskMonitor
- This is provided by TaskManager
to allow the Task
to modify its user interface.protected abstract void doLayout(TaskMonitor taskMonitor)
taskMonitor
- Provided to allow updates to the task status.
|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |