org.dftproject.genesis.core.research
Class Task

java.lang.Object
  extended by org.dftproject.genesis.core.research.Task
Direct Known Subclasses:
PGVSearch, PGVUpdate

public abstract class Task
extends java.lang.Object

A task.


Constructor Summary
Task(TaskFamily family)
          Creates a task in the given task family.
 
Method Summary
 void cancel()
          Cancels this task.
protected  void finished()
          Called when this task completes.
abstract  java.lang.String getDescription()
          Returns the description of this task.
 TaskFamily getFamily()
          Returns this tasks's family.
 java.lang.String getFullDescription()
          Returns the full description of this task (including the subtask or canceled status).
abstract  org.eclipse.swt.graphics.Image getIcon()
          Returns the icon of this task.
 boolean isCanceled()
          Returns whether or not this task has been canceled.
abstract  void run()
          The execution of this task.
 void start()
          Starts this task.
 void subTask(java.lang.String subTask)
          Sets this task's subtask description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task(TaskFamily family)
Creates a task in the given task family.

Parameters:
family - a task family
Method Detail

getFamily

public TaskFamily getFamily()
Returns this tasks's family.

Returns:
a task family

start

public void start()
Starts this task.


cancel

public void cancel()
Cancels this task.


subTask

public void subTask(java.lang.String subTask)
Sets this task's subtask description.

Parameters:
subTask - subtask description

isCanceled

public boolean isCanceled()
Returns whether or not this task has been canceled.

Returns:
if this task has been canceled

finished

protected void finished()
Called when this task completes.


getFullDescription

public java.lang.String getFullDescription()
Returns the full description of this task (including the subtask or canceled status).

Returns:
the full description

getDescription

public abstract java.lang.String getDescription()
Returns the description of this task.

Returns:
a description

getIcon

public abstract org.eclipse.swt.graphics.Image getIcon()
Returns the icon of this task.

Returns:
an icon

run

public abstract void run()
The execution of this task.