public class Progress extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Progress.Info |
| Constructor and Description |
|---|
Progress(String name)
Top-level progress indicator for a given task.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IProgressListener l) |
void |
cancel()
Request the action to be cancelled.
|
void |
complete() |
Progress |
createParallelProgress(String name,
double work) |
Progress |
createSubProgress(String name,
double work)
Create a single (non-parallel) sub-progress indicator for the specified portion of work.
|
String |
getActionPath(int levels)
Get the path until the first parallel subprocess or the specified level
|
double |
getCompletedWork() |
double |
getFraction() |
String |
getName() |
List<Progress.Info> |
getParallels(int level)
Return all parallel-running progress parts, starting with the root one.
|
Progress |
getParent() |
int |
getPercentage() |
Progress |
getRoot()
Return the root progress handler; this NEVER returns null - it returns itself if it is the root.
|
double |
getTotalWork() |
void |
increment(double inc) |
boolean |
isCancelable() |
boolean |
isCancelled() |
void |
removeListener(IProgressListener l) |
void |
setCancelable(boolean yes) |
void |
setCompleted(double now)
Set the amount of work completed.
|
void |
setCompleted(double now,
String extra) |
void |
setTotalWork(double work)
Set the current amount of work.
|
void |
setTotalWork(double work,
String extra)
Set the current amount of work.
|
protected void |
updated() |
@Nonnull public List<Progress.Info> getParallels(int level)
level - @Nonnull public Progress getRoot()
public boolean isCancelable()
public double getTotalWork()
public double getCompletedWork()
public int getPercentage()
public double getFraction()
@Nonnull public String getActionPath(int levels)
public void cancel()
public void setCancelable(boolean yes)
public boolean isCancelled()
public void setTotalWork(double work)
work - name - public void setTotalWork(double work,
@Nullable
String extra)
work - extra - public void setCompleted(double now)
now - public void complete()
public void increment(double inc)
@Nonnull public Progress createSubProgress(@Nullable String name, double work)
@Nonnull public Progress createParallelProgress(@Nullable String name, double work)
protected void updated()
public void addListener(@Nonnull IProgressListener l)
public void removeListener(@Nonnull IProgressListener l)
Copyright © 2017 etc.to. All rights reserved.