edu.stanford.smi.protegex.owl.model
Class AbstractTask

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.model.AbstractTask
All Implemented Interfaces:
Task

public abstract class AbstractTask
extends Object
implements Task

User: matthewhorridge
The University Of Manchester
Medical Informatics Group
Date: Sep 12, 2005

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm


Field Summary
private  boolean canBeCancelled
           
private  boolean cancelled
           
private  String title
           
private  TaskManager tm
           
 
Constructor Summary
AbstractTask(String title, boolean canBeCancelled, TaskManager tm)
           
 
Method Summary
 void cancelTask()
          Requests that the task be cancelled.
 int getProgressMax()
          Gets the maximum progress value for this task.
 int getProgressMin()
          Gets the minimum progress value for this task.
 String getTitle()
          Gets the title for this task.
 boolean isCancelled()
          Checks whether this Task has been cancelled.
 boolean isPossibleToCancel()
          Determines if the task can be cancelled
 void setMessage(String message)
           
 void setProgress(int value)
           
 void setProgressIndeterminate(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.Task
runTask
 

Field Detail

cancelled

private boolean cancelled

title

private String title

canBeCancelled

private boolean canBeCancelled

tm

private TaskManager tm
Constructor Detail

AbstractTask

public AbstractTask(String title,
                    boolean canBeCancelled,
                    TaskManager tm)
Method Detail

isPossibleToCancel

public boolean isPossibleToCancel()
Description copied from interface: Task
Determines if the task can be cancelled

Specified by:
isPossibleToCancel in interface Task
Returns:
true if the task can be cancelled, or false if the task cannot be cancelled.

cancelTask

public void cancelTask()
Description copied from interface: Task
Requests that the task be cancelled. This method will only be called if the task can be cancelled.

Specified by:
cancelTask in interface Task

getTitle

public String getTitle()
Description copied from interface: Task
Gets the title for this task.

Specified by:
getTitle in interface Task

getProgressMin

public int getProgressMin()
Description copied from interface: Task
Gets the minimum progress value for this task.

Specified by:
getProgressMin in interface Task

getProgressMax

public int getProgressMax()
Description copied from interface: Task
Gets the maximum progress value for this task.

Specified by:
getProgressMax in interface Task

isCancelled

public boolean isCancelled()
Description copied from interface: Task
Checks whether this Task has been cancelled. Unless either method is overloaded, this will return true after cancelTask has been called (e.g., via the cancel button).

Specified by:
isCancelled in interface Task
Returns:
true if this has been cancelled

setProgress

public void setProgress(int value)

setProgressIndeterminate

public void setProgressIndeterminate(boolean b)

setMessage

public void setMessage(String message)