|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.util.ChainedProgressReporter
public class ChainedProgressReporter
An implementation of the ProgressReporter interface that chains to another progress reporter while recalculating the percentage values. This class is useful when you call several methods in a row that each of them outputs progress messages between 0 and 100 percent. Use this progress reporter to change the scale so that the first method output values between 0 and 20, the next between 20 and 50, and so on.
| Constructor Summary | |
|---|---|
ChainedProgressReporter(ProgressReporter master)
Create a new chained progress reporter. |
|
| Method Summary | |
|---|---|
void |
append(String message)
Append a message to the previous one. |
void |
display(int percent,
String message)
Display a progress message. |
void |
setRange(int start,
int end)
Set the range to use for the percentage values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChainedProgressReporter(ProgressReporter master)
master - The master progress reportersetRange(int, int)| Method Detail |
|---|
public void display(int percent,
String message)
ProgressReporter
display in interface ProgressReporterpercent - How many percent of the task that is completedmessage - A message, or nullpublic void append(String message)
ProgressReporter
append in interface ProgressReportermessage - The message
public void setRange(int start,
int end)
display(int, String) method is invoked the percentage
value is recalculated to be within the specified range before the
master progress reporter is invoked.
Ie. 0 --> start and 100 --> end.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||