public class TextProgressMonitor extends BatchingProgressMonitor
Modifier and Type | Field and Description |
---|---|
private java.io.Writer |
out |
private boolean |
write |
UNKNOWN
Constructor and Description |
---|
TextProgressMonitor()
Initialize a new progress monitor.
|
TextProgressMonitor(java.io.Writer out)
Initialize a new progress monitor.
|
Modifier and Type | Method and Description |
---|---|
private void |
format(java.lang.StringBuilder s,
java.lang.String taskName,
int workCurr) |
private void |
format(java.lang.StringBuilder s,
java.lang.String taskName,
int cmp,
int totalWork,
int pcnt) |
protected void |
onEndTask(java.lang.String taskName,
int workCurr)
Finish the progress monitor when the total wasn't known in advance.
|
protected void |
onEndTask(java.lang.String taskName,
int cmp,
int totalWork,
int pcnt)
Finish the progress monitor when the total is known in advance.
|
protected void |
onUpdate(java.lang.String taskName,
int workCurr)
Update the progress monitor if the total work isn't known,
|
protected void |
onUpdate(java.lang.String taskName,
int cmp,
int totalWork,
int pcnt)
Update the progress monitor when the total is known in advance.
|
private void |
send(java.lang.StringBuilder s) |
beginTask, endTask, isCancelled, setDelayStart, start, update
public TextProgressMonitor()
public TextProgressMonitor(java.io.Writer out)
out
- the stream to receive messages on.protected void onUpdate(java.lang.String taskName, int workCurr)
onUpdate
in class BatchingProgressMonitor
taskName
- name of the task.workCurr
- number of units already completed.protected void onEndTask(java.lang.String taskName, int workCurr)
onEndTask
in class BatchingProgressMonitor
taskName
- name of the task.workCurr
- total number of units processed.private void format(java.lang.StringBuilder s, java.lang.String taskName, int workCurr)
protected void onUpdate(java.lang.String taskName, int cmp, int totalWork, int pcnt)
onUpdate
in class BatchingProgressMonitor
taskName
- name of the task.cmp
- number of units already completed.totalWork
- estimated number of units to process.pcnt
- workCurr * 100 / workTotal
.protected void onEndTask(java.lang.String taskName, int cmp, int totalWork, int pcnt)
onEndTask
in class BatchingProgressMonitor
taskName
- name of the task.cmp
- total number of units processed.totalWork
- estimated number of units to process.pcnt
- workCurr * 100 / workTotal
.private void format(java.lang.StringBuilder s, java.lang.String taskName, int cmp, int totalWork, int pcnt)
private void send(java.lang.StringBuilder s)