|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.util.StdErrProgressWriter
public class StdErrProgressWriter
A progress listener that writes the progress messages to the standard error stream (System.err
).
Field Summary | |
---|---|
protected int |
currentStep
|
private long |
elapsed
|
private long |
estimatedEndDate
|
private long |
estimatedLength
|
protected boolean |
finished
|
protected DateFormat |
format
|
protected String |
message
|
protected short |
messageLength
|
protected int |
newLineWidth
|
protected short |
screenWidth
|
protected long |
startDate
|
protected int |
stepWidth
|
protected int |
totalSteps
|
Constructor Summary | |
---|---|
StdErrProgressWriter(int totalSteps,
String message)
Initialises a progress writer with a stepWidth of 1. |
|
StdErrProgressWriter(int totalSteps,
String message,
int stepWidth)
Initialises a new progress writer. |
|
StdErrProgressWriter(int totalSteps,
String message,
int stepWidth,
int newLineWidth)
|
Method Summary | |
---|---|
int |
getCurrentStep()
|
String |
getMessage()
|
private short |
getScreenWidth()
|
int |
getSteps()
|
void |
insertColumn(int columns,
String message)
|
void |
insertRow(int rows,
String message)
|
void |
progress()
Progress by one step. |
void |
progress(int currentStep)
Progress by the given steps. |
void |
progress(String message)
Progress by one step, and change the message |
void |
progress(String message,
int currentStep)
Progress by the given steps, and change the message |
void |
setCurrentStep(int currentStep)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String message
protected int currentStep
protected int totalSteps
protected int stepWidth
protected long startDate
private long elapsed
private long estimatedLength
private long estimatedEndDate
protected DateFormat format
protected short messageLength
protected short screenWidth
protected int newLineWidth
protected boolean finished
Constructor Detail |
---|
public StdErrProgressWriter(int totalSteps, String message)
stepWidth
of 1.
public StdErrProgressWriter(int totalSteps, String message, int stepWidth)
totalSteps
- The total number of stepsmessage
- The basic message, "x of y, ETA hh:mm:ss zzz" will be added automatically to this.stepWidth
- How often the message should be updated. Use a bigger stepWidth to improve the performance. The
first and last step are printed regardless of the value of the stepWith.public StdErrProgressWriter(int totalSteps, String message, int stepWidth, int newLineWidth)
Method Detail |
---|
private short getScreenWidth()
public void progress()
ProgressListener
progress
in interface ProgressListener
public void progress(int currentStep)
ProgressListener
progress
in interface ProgressListener
public void progress(String message)
ProgressListener
progress
in interface ProgressListener
public void progress(String message, int currentStep)
ProgressListener
progress
in interface ProgressListener
public void insertRow(int rows, String message)
insertRow
in interface ProgressListener
public void insertColumn(int columns, String message)
insertColumn
in interface ProgressListener
public String getMessage()
public int getCurrentStep()
getCurrentStep
in interface ProgressListener
public int getSteps()
public void setCurrentStep(int currentStep)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |