|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javanetworkanalyzer.progress.DefaultProgressMonitor
public class DefaultProgressMonitor
Default implementation of a progress monitor that prints a progress bar to the console.
| Constructor Summary | |
|---|---|
DefaultProgressMonitor()
|
|
| Method Summary | |
|---|---|
void |
endTask()
Does nothing. |
long |
getEnd()
Gets the end value of the current task. |
int |
getPercentageComplete()
Returns the percentage complete. |
boolean |
isCancelled()
Returns true if the process is canceled and should end as quickly
as possible. |
void |
setProgress(long count)
Sets the progress and returns the percentage complete. |
void |
setProgress(long count,
long startTime)
Sets the progress, keeping track of the start time, and returns the percentage complete. |
void |
startTask(String taskName,
long end)
Sets the end and instantiates a ConsoleProgressBar for this task. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultProgressMonitor()
| Method Detail |
|---|
public void startTask(String taskName,
long end)
ConsoleProgressBar for this task.
startTask in interface ProgressMonitortaskName - The task name.end - The end time.ProgressMonitor.startTask(java.lang.String, long).public void endTask()
endTask in interface ProgressMonitorProgressMonitor.endTask().public boolean isCancelled()
true if the process is canceled and should end as quickly
as possible.
isCancelled in interface ProgressMonitorpublic void setProgress(long count)
setProgress in interface ProgressMonitorcount - The count.public int getPercentageComplete()
getPercentageComplete in interface ProgressMonitorpublic long getEnd()
getEnd in interface ProgressMonitor
public void setProgress(long count,
long startTime)
setProgress in interface ProgressMonitorcount - A counter to keep track of which iteration in a loop.startTime - The System time in milliseconds when this task was
started.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||