us.zuercher.gpx2map.util
Interface ProgressMeter

All Known Implementing Classes:
GuiProgressMeter, PrintStreamProgressMeter

public interface ProgressMeter

ProgressMeter represents a work progress meter with implementation-specific output.

Author:
Stephan Zuercher

Method Summary
 void reset()
          Reset the progress meter.
 void setCount(int count)
          Set the number of work items.
 void setTaskName(String taskName)
          Optionally set the task name.
 void updateProgress(int count)
          Set the current progress.
 

Method Detail

setTaskName

void setTaskName(String taskName)
Optionally set the task name. Must be called before setCount(int) or immediately after reset().

Parameters:
taskName - name of the task.

reset

void reset()
Reset the progress meter. If the current progress of the meter is not 100%, it will be updated to 100% before being reset. After calling this method, you may call setTaskName(String). After calling thism method, you must call setCount(int) before calling updateProgress(int).


setCount

void setCount(int count)
Set the number of work items. You may only call this before the first call to updateProgress(int) or immediately after a call to reset().

Parameters:
count - number of work items (must be greater than 0)

updateProgress

void updateProgress(int count)
Set the current progress. 100% is indicated when count equals the parameter given to setCount(int). Values of count over multiple calls must always increase. Do not call the method twice with the same value or with a lower value.

Parameters:
count - current progress.