de.vxart.zipupdate
Interface ProgressListener

All Known Subinterfaces:
MultiProgressListener
All Known Implementing Classes:
MultiProgressDialog, ProgressDialog, ProgressListenerManager, ProgressPanel

public interface ProgressListener

Author:
Philipp Reichart, philipp.reichart@vxart.de

Method Summary
 void finish()
          Finishes the display of progress by a progress listener, e.g.
 int getProgress()
          Returns the latest value set by the update method.
 void init(java.lang.String message)
          Sets or resets this listener to indeterminate mode and labels it with the given message.
 void init(java.lang.String message, int min, int max)
          Sets or resets this listener to determinate mode using the specified message, minimum and maximum values.
 void label(java.lang.String label)
          Labels the current task with the specified string.
 void update(int progress)
          Updates the progress to the specified value.
 

Method Detail

init

void init(java.lang.String message)
Sets or resets this listener to indeterminate mode and labels it with the given message. Indeterminate mode is used for tasks of unknown length.


init

void init(java.lang.String message,
          int min,
          int max)
Sets or resets this listener to determinate mode using the specified message, minimum and maximum values.


update

void update(int progress)
Updates the progress to the specified value. Implementations may rely on this happening in order to provide advanced progress information, therefore the caller should update continously and not "jump"around.

Parameters:
progress - the new progress value

getProgress

int getProgress()
Returns the latest value set by the update method.

Returns:
the current progress value

label

void label(java.lang.String label)
Labels the current task with the specified string.

Parameters:
label - a label describing the current task

finish

void finish()
Finishes the display of progress by a progress listener, e.g. by closing a progress dialog.