uk.org.retep.util.monitor
Class ProgressListenerAdaptor

java.lang.Object
  extended by uk.org.retep.util.monitor.ProgressListenerAdaptor
All Implemented Interfaces:
ProgressListener
Direct Known Subclasses:
BandwidthProgressListener

public class ProgressListenerAdaptor
extends java.lang.Object
implements ProgressListener

A base implementstion of ProgressListener that does nothing. The required methods should be overridden by the subclass.

Author:
peter

Constructor Summary
ProgressListenerAdaptor()
           
 
Method Summary
 void setMaximum(long maximum)
          Notify the listeners that the maximum value has changed
 void setMaximum(long inputMaximum, long outputMaximum)
          Notify the listeners that the maximum value has changed
 void showProgress(int progress)
          Notify listeners of the current progress.
 void showProgress(long inputSize, long outputSize)
          Notify listners of the current progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressListenerAdaptor

public ProgressListenerAdaptor()
Method Detail

showProgress

public void showProgress(int progress)
Description copied from interface: ProgressListener
Notify listeners of the current progress.

Specified by:
showProgress in interface ProgressListener
Parameters:
progress - The current value of the process

showProgress

public void showProgress(long inputSize,
                         long outputSize)
Description copied from interface: ProgressListener
Notify listners of the current progress. This method is normall used by compression routines so the listener knows how much the input has been compressed by

Specified by:
showProgress in interface ProgressListener
Parameters:
inputSize - The current size of the input, possibly the amount read so far
outputSize - The current size of the output, probably the total size of the compressed output

setMaximum

public void setMaximum(long maximum)
Description copied from interface: ProgressListener
Notify the listeners that the maximum value has changed

Specified by:
setMaximum in interface ProgressListener
Parameters:
maximum - The new maximum

setMaximum

public void setMaximum(long inputMaximum,
                       long outputMaximum)
Description copied from interface: ProgressListener
Notify the listeners that the maximum value has changed

Specified by:
setMaximum in interface ProgressListener
Parameters:
inputMaximum - The new maximum for the input
outputMaximum - The new maximum for the output.


Copyright © 1998-2010 Retep Development Group. All Rights Reserved.