Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.layout
Class LayoutTask

java.lang.Object
  extended by cytoscape.layout.LayoutTask
All Implemented Interfaces:
Haltable, Task, Runnable

public class LayoutTask
extends Object
implements Task

A wrapper for applying a layout in a task. Use it something like this:

TaskManager.executeTask( new LayoutTask(layout, view), LayoutTask.getDefaultTaskConfig() );


Constructor Summary
LayoutTask(CyLayoutAlgorithm layout, CyNetworkView view)
          Creates the task.
 
Method Summary
static JTaskConfig getDefaultTaskConfig()
          This method returns a default TaskConfig object.
 String getTitle()
          Get the "nice" title of this algorithm
 void halt()
          Halt the algorithm if the CyLayoutAlgorithm supports it.
 void run()
          Run the algorithm.
 void setTaskMonitor(TaskMonitor monitor)
          Sets the task monitor to be used for the layout.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutTask

public LayoutTask(CyLayoutAlgorithm layout,
                  CyNetworkView view)
Creates the task.

Parameters:
layout - The CyLayoutAlgorithm to apply.
view - The view the algorithm should be applied to.
Method Detail

setTaskMonitor

public void setTaskMonitor(TaskMonitor monitor)
Sets the task monitor to be used for the layout.

Specified by:
setTaskMonitor in interface Task
Parameters:
monitor - TaskMonitor Object.

run

public void run()
Run the algorithm.

Specified by:
run in interface Task
Specified by:
run in interface Runnable

halt

public void halt()
Halt the algorithm if the CyLayoutAlgorithm supports it.

Specified by:
halt in interface Haltable
Specified by:
halt in interface Task

getTitle

public String getTitle()
Get the "nice" title of this algorithm

Specified by:
getTitle in interface Task
Returns:
algorithm title

getDefaultTaskConfig

public static JTaskConfig getDefaultTaskConfig()
This method returns a default TaskConfig object.

Returns:
a default JTaskConfig object.

www.cytoscape.org