public class FakeWorkProgress extends Object implements WorkProgress
WorkProgress.MultiTask| Constructor and Description |
|---|
FakeWorkProgress() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(CancelException reason)
Cancel the underlying work.
|
void |
done()
Signal all the work has been done.
|
void |
error(Exception error)
Signal an error.
|
long |
getAmount()
Return the total amount of work to be done.
|
long |
getPosition()
Return the current position, which is the current amount of work already done.
|
long |
getRemainingWork()
Return the amount of remaining work.
|
String |
getSubText()
Return a sub-text describing the work being done.
|
ISynchronizationPoint<Exception> |
getSynch()
Return a synchronization point that will be unblocked by one of the method done, error or cancel.
|
String |
getText()
Return the text describing the work being done.
|
void |
listen(Runnable onchange)
Add a listener to call on every change in the progress.
|
void |
progress(long amountDone)
Add an amount of work already done.
|
void |
setAmount(long work)
Set the total amount of work to be done.
|
void |
setPosition(long position)
Set the position (amount of work already done).
|
void |
setSubText(String text)
Set the sub-text describing the work being done.
|
void |
setText(String text)
Set the text describing the work being done.
|
void |
unlisten(Runnable onchange)
Remove a listener to call on every change in the progress.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlink, linkTo, linkTopublic long getPosition()
WorkProgressgetPosition in interface WorkProgresspublic long getAmount()
WorkProgressgetAmount in interface WorkProgresspublic long getRemainingWork()
WorkProgressgetRemainingWork in interface WorkProgresspublic String getText()
WorkProgressgetText in interface WorkProgresspublic String getSubText()
WorkProgressgetSubText in interface WorkProgresspublic void progress(long amountDone)
WorkProgressprogress in interface WorkProgresspublic void done()
WorkProgressdone in interface WorkProgresspublic void error(Exception error)
WorkProgresserror in interface WorkProgresspublic void cancel(CancelException reason)
WorkProgresscancel in interface WorkProgresspublic ISynchronizationPoint<Exception> getSynch()
WorkProgressgetSynch in interface WorkProgresspublic void setAmount(long work)
WorkProgresssetAmount in interface WorkProgresspublic void setPosition(long position)
WorkProgresssetPosition in interface WorkProgresspublic void setSubText(String text)
WorkProgresssetSubText in interface WorkProgresspublic void setText(String text)
WorkProgresssetText in interface WorkProgresspublic void listen(Runnable onchange)
WorkProgresslisten in interface WorkProgresspublic void unlisten(Runnable onchange)
WorkProgressunlisten in interface WorkProgressCopyright © 2017. All rights reserved.