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

cytoscape.layout
Class LayoutTask

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

public class LayoutTask
extends Object
implements cytoscape.task.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 cytoscape.task.ui.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(cytoscape.task.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(cytoscape.task.TaskMonitor monitor)
Sets the task monitor to be used for the layout.

Specified by:
setTaskMonitor in interface cytoscape.task.Task

run

public void run()
Run the algorithm.

Specified by:
run in interface cytoscape.task.Task
Specified by:
run in interface Runnable

halt

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

Specified by:
halt in interface cytoscape.task.Haltable
Specified by:
halt in interface cytoscape.task.Task

getTitle

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

Specified by:
getTitle in interface cytoscape.task.Task
Returns:
algorithm title

getDefaultTaskConfig

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

Returns:
a default JTaskConfig object.

www.cytoscape.org