@OpenApiAll
public interface RunnableWithProgress
// create runnable
RunnableWithProgress runnable = new RunnableWithProgress()
{
public void run(ProgressStatus progressStatus)
{
int max = Integer.MAX_VALUE;
progressStatus.init("Counting...", 0, max);
for (int i = 0; i < max; ++i)
{
if (progressStatus.isCancel())
{
// cancel clicked
return;
}
progressStatus.increase();
}
}
};
// run with progress
ProgressStatusRunner.runWithProgressStatus(runnable, "My progress", true, 0);
ProgressStatusRunner| Modifier and Type | Method and Description |
|---|---|
void |
run(ProgressStatus progressStatus)
Performs task with progress status.
|
void run(ProgressStatus progressStatus)
progressStatus - ProgressStatus