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.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
DEBUG
private static final boolean DEBUG
- Debug flag
currentValue
int currentValue
numberOfSteps
int numberOfSteps
out
PrintStream out
started
boolean started
ProgressPrinter
public ProgressPrinter(PrintStream out,
int numberOfSteps)
- Constructor.
- Parameters:
out
- the stream used for outputnumberOfSteps
- 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
-
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
-