public class ProgressSpinner extends Object
OutputStream
.
This is class is not thread-safe. The update method may only be used from a
single thread. Updates are sent only as frequently as update()
is
invoked by the caller, and are capped at no more than 2 times per second by
requiring at least 500 milliseconds between updates.
Constructor and Description |
---|
ProgressSpinner(OutputStream out)
Initialize a new spinner.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(String title,
long delay,
TimeUnit delayUnits)
Begin a time consuming task.
|
void |
endTask(String result)
Denote the current task completed.
|
void |
update()
Update the spinner if it is showing.
|
public ProgressSpinner(OutputStream out)
out
- where to send output to.public void beginTask(String title, long delay, TimeUnit delayUnits)
title
- description of the task, suitable for human viewing.delay
- delay to wait before displaying anything at all.delayUnits
- unit for delay
.public void update()
public void endTask(String result)
result
- text to print after the task's title
"$title ... $result"
.Copyright © 2019 Eclipse JGit Project. All rights reserved.