|
Cytoscape 3.0.0-alpha8-SNAPSHOT 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.AbstractBasicLayoutTask
public abstract class AbstractBasicLayoutTask
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 CyNetworkView |
networkView
The network view that the layout will be applied to. |
protected boolean |
selectedOnly
Indicates whether to apply the layout to all nodes or only the selected nodes. |
protected Set<View<CyNode>> |
staticNodes
The set of nodes whose positions are locked and not meant to change. |
| Fields inherited from class org.cytoscape.work.AbstractTask |
|---|
cancelled |
| Constructor Summary | |
|---|---|
AbstractBasicLayoutTask(String name,
AbstractLayoutAlgorithmContext context)
Constructor. |
|
| Method Summary | |
|---|---|
protected abstract void |
doLayout(TaskMonitor taskMonitor)
This method is designed to actually encapsulate the layout algorithm. |
protected boolean |
isLocked(View<CyNode> v)
Returns true if the specified node view is locked in place, false otherwise. |
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>> staticNodes
protected final boolean selectedOnly
| Constructor Detail |
|---|
public AbstractBasicLayoutTask(String name,
AbstractLayoutAlgorithmContext context)
networkView - The network view that the layout algorithm will be applied to.name - The name of the algorithm. Used for setting attributes associated with
this layout.selectedOnly - Indicates whether the layout should be applied to the selected nodes
or not.staticNodes - The list of nodes whose positions are meant to be locked and
not changed.| Method Detail |
|---|
public final void run(TaskMonitor taskMonitor)
AbstractTaskTask begins execution.
This method should not be called by the programmer, as it will be called by the TaskManager.
run in interface Taskrun in class AbstractTasktaskMonitor - This is provided by TaskManager
to allow the Task to modify its user interface.protected boolean isLocked(View<CyNode> v)
v - The node view to test.
protected abstract void doLayout(TaskMonitor taskMonitor)
taskMonitor - Provided to allow updates to the task status.
|
Cytoscape 3.0.0-alpha8-SNAPSHOT API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||