gate.util
Class ProgressPrinter

java.lang.Object
  |
  +--gate.util.ProgressPrinter
All Implemented Interfaces:
EventListener, ProgressListener

public class ProgressPrinter
extends Object
implements ProgressListener

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


Field Summary
(package private)  int currentValue
           
private static boolean DEBUG
          Debug flag
(package private)  int numberOfSteps
           
(package private)  PrintStream out
           
(package private)  boolean started
           
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

currentValue

int currentValue

numberOfSteps

int numberOfSteps

out

PrintStream out

started

boolean started
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
Following copied from interface: gate.event.ProgressListener
Parameters:
i -