gate.util
Class ProgressPrinter

java.lang.Object
  extended by gate.util.ProgressPrinter
All Implemented Interfaces:
ProgressListener, EventListener

public class ProgressPrinter
extends Object
implements ProgressListener

Class used to simulate the behaviour of a progress bar on an OutputStream.


Constructor Summary
ProgressPrinter(PrintStream out)
          Constructor.
ProgressPrinter(PrintStream out, int numberOfSteps)
          Constructor.
 
Method Summary
 void processFinished()
          Called when the process is finished.
 void progressChanged(int newValue)
          Called when the progress has changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressPrinter

public ProgressPrinter(PrintStream out,
                       int numberOfSteps)
Constructor.

Parameters:
out - the stream used for output
numberOfSteps - the number of steps until the process is over (the number of characters printed for a full run)

ProgressPrinter

public ProgressPrinter(PrintStream out)
Constructor. Uses the default number of steps.

Parameters:
out -
Method Detail

processFinished

public void processFinished()
Description copied from interface: ProgressListener
Called when the process is finished.

Specified by:
processFinished in interface ProgressListener

progressChanged

public void progressChanged(int newValue)
Description copied from interface: ProgressListener
Called when the progress has changed

Specified by:
progressChanged in interface ProgressListener