com.dynalivery.repository.util
Class ProgressReporter

java.lang.Object
  |
  +--com.dynalivery.repository.util.ProgressReporter
Direct Known Subclasses:
SwingProgressReporter

public abstract class ProgressReporter
extends java.lang.Object

This abstract class is used to report the progress of a potentially long operation


Constructor Summary
ProgressReporter()
          Create a progress reporter
 
Method Summary
 void initialize(java.lang.String operationMessage, int min, int max)
          Initialize the progress reporter
 boolean isCanceled()
          Returns true if canceled flag is set
 boolean isInitialized()
          Returns true if ProgressReporter is initialized
 void setCanceled()
          Set the canceled flag to true
abstract  void setMessage(java.lang.String message)
          Change the progress message
abstract  void setProgress(int value)
          Report the progress of an operation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressReporter

public ProgressReporter()
Create a progress reporter
Method Detail

initialize

public void initialize(java.lang.String operationMessage,
                       int min,
                       int max)
Initialize the progress reporter
Parameters:
operationMessage - a String describing the overall operation
min - an integer value representing the starting point of an operation
max - an integer value representing the ending point of an operation

setMessage

public abstract void setMessage(java.lang.String message)
Change the progress message
Parameters:
message - a message String indicating what progress has occurred

setProgress

public abstract void setProgress(int value)
Report the progress of an operation.
Parameters:
value - an integer value between the original min/max values that indicates what progress has occurred

setCanceled

public void setCanceled()
Set the canceled flag to true

isCanceled

public boolean isCanceled()
Returns true if canceled flag is set

isInitialized

public boolean isInitialized()
Returns true if ProgressReporter is initialized