org.progeeks.util
Class DefaultProgressReporter

java.lang.Object
  extended by org.progeeks.util.DefaultProgressReporter
All Implemented Interfaces:
ProgressReporter

public class DefaultProgressReporter
extends java.lang.Object
implements ProgressReporter

Default base implementation of the ProgressReporter interface.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
DefaultProgressReporter()
           
 
Method Summary
 void done()
          Indicates that the operation has completed.
 int getMaximum()
          Returns the maximum progress value.
 java.lang.String getMessage()
          Returns the string message associated with the current part of the task being performed.
 int getMinimum()
          Returns the minimum progress value.
 int getProgress()
          Returns the current progress amount.
 boolean isCanceled()
          Returns true when the operation has been canceled by the user.
 void setMaximum(int val)
          Sets the maximum progress value.
 void setMessage(java.lang.String message)
          Sets the string message associated with the current part of the task being performed.
 void setMinimum(int val)
          Sets the minimum progress value.
 void setProgress(int val)
          Sets the current progress amount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProgressReporter

public DefaultProgressReporter()
Method Detail

setMessage

public void setMessage(java.lang.String message)
Sets the string message associated with the current part of the task being performed.

Specified by:
setMessage in interface ProgressReporter

getMessage

public java.lang.String getMessage()
Returns the string message associated with the current part of the task being performed.

Specified by:
getMessage in interface ProgressReporter

setProgress

public void setProgress(int val)
Sets the current progress amount.

Specified by:
setProgress in interface ProgressReporter

getProgress

public int getProgress()
Returns the current progress amount.

Specified by:
getProgress in interface ProgressReporter

setMinimum

public void setMinimum(int val)
Sets the minimum progress value.

Specified by:
setMinimum in interface ProgressReporter

getMinimum

public int getMinimum()
Returns the minimum progress value.

Specified by:
getMinimum in interface ProgressReporter

setMaximum

public void setMaximum(int val)
Sets the maximum progress value.

Specified by:
setMaximum in interface ProgressReporter

getMaximum

public int getMaximum()
Returns the maximum progress value.

Specified by:
getMaximum in interface ProgressReporter

isCanceled

public boolean isCanceled()
Returns true when the operation has been canceled by the user. The active task should check this flag to discontinue its operation in the event of a user-cancel. Default implementation always returns false.

Specified by:
isCanceled in interface ProgressReporter

done

public void done()
Indicates that the operation has completed. Default implementation does nothing.

Specified by:
done in interface ProgressReporter


Copyright © 2002-2003 Paul Speed. All Rights Reserved.