DESY ACOP Beans Home

com.cosylab.gui.components
Interface ProgressMonitor

All Known Implementing Classes:
AbstractProgressTask

public interface ProgressMonitor

Interface defining progress monitoring for long running tasks. This interface defines listeners to be notified on progress of long running tasks.
Progress is defined as an integer value without any predefined scale. Implementor will provide maximum ammount (getTotal()) and periodically update current value. When getCurrent() equals getTotal() the task is expected to end.

Version:
$Revision: 1.3 $
Author:
Ales Pucelj

Method Summary
 void addProgressListener(ProgressListener listener)
          Add progress listener to this object.
 int getCurrent()
          Returns current progress, value will be between 0 and getStatus().
 java.lang.String getStatus()
          Returns description of current task.
 int getTotal()
          Returns total progress, that is value when this task will be complete.
 void removeProgressListener(ProgressListener listener)
          Removes listener.
 

Method Detail

addProgressListener

void addProgressListener(ProgressListener listener)
Add progress listener to this object. Listener will be notified about task start and end and also itermediate progress or interruptions.

Parameters:
listener - to add.

getCurrent

int getCurrent()
Returns current progress, value will be between 0 and getStatus().

Returns:
current value of progress.

getTotal

int getTotal()
Returns total progress, that is value when this task will be complete.

Returns:
Total progress.

getStatus

java.lang.String getStatus()
Returns description of current task. This text may change at any time to indicate different phases.

Returns:
Textual description.

removeProgressListener

void removeProgressListener(ProgressListener listener)
Removes listener.

Parameters:
listener - to remove.


Copyright © 2010. All Rights Reserved.