edu.stanford.smi.protegex.owl.model
Interface TaskProgressDisplay

All Known Implementing Classes:
NoopProgressDisplay, ProgressDisplayDialog

public interface TaskProgressDisplay

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

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


Method Summary
 void begin(Task task)
          Starts the display of progress to the user.
 void end()
          Stops (hides) the progress display.
 long getDisplayDelay()
          Gets the length of time between the task starting and the progress display being displayed.
 boolean isModal()
          Determines whether or not the progress display is modal and therfore blocks the main event pump when run() is called.
 void setMessage(String message)
          Sets the message that will be displayed to the user.
 void setProgress(int progress)
          Updates the value of the progress that is displayed to the user.
 void setProgressIndeterminate(boolean b)
          Sets the progress display to indicate that the progress cannot be determined, but the task is proceding as normal.
 void setSubTaskMessage(String message)
           
 

Method Detail

begin

public void begin(Task task)
Starts the display of progress to the user. Note that this method will be called after any period of delay that is specified by the getDisplayDelay method.

Parameters:
task - The Task whose progress will be monitored and displayed.

setProgress

public void setProgress(int progress)
Updates the value of the progress that is displayed to the user.

Parameters:
progress - The progress that will be between the min and max progress for the Task

setProgressIndeterminate

public void setProgressIndeterminate(boolean b)
Sets the progress display to indicate that the progress cannot be determined, but the task is proceding as normal.

Parameters:
b - true if the progress is indeterminate, or false if the progress is not indeterminate.

setSubTaskMessage

public void setSubTaskMessage(String message)

setMessage

public void setMessage(String message)
Sets the message that will be displayed to the user.


end

public void end()
Stops (hides) the progress display. This methods is generally called when the task is complete.


getDisplayDelay

public long getDisplayDelay()
Gets the length of time between the task starting and the progress display being displayed.

Returns:
The delay in milliseconds.

isModal

public boolean isModal()
Determines whether or not the progress display is modal and therfore blocks the main event pump when run() is called. For example if the progress display is a modal JDialog then this method should return true since showing the progress display will block user input until the task has finished and end() is called. In general, any Swing progress display should be modal.