public class FakeWorkProgress extends Object implements WorkProgress
WorkProgress.MultiTask| Constructor and Description |
|---|
FakeWorkProgress() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Runnable onchange)
Add a listener.
|
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.
|
IAsync<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.
|
boolean |
hasListeners()
Return true if at least one listener is present.
|
void |
interruptEvents()
Stop triggering events to listener, this may be useful before doing several modifications.
|
void |
progress(long amountDone)
Add an amount of work already done.
|
void |
removeListener(Runnable onchange)
Remove a listener.
|
void |
resumeEvents(boolean trigger)
Resume triggering events after a call to interruptEvents(), and optionally trigger an event now.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlink, linkTo, linkTolisten, unlistenpublic 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 IAsync<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 addListener(Runnable onchange)
SimpleListenableaddListener in interface SimpleListenablepublic void removeListener(Runnable onchange)
SimpleListenableremoveListener in interface SimpleListenablepublic boolean hasListeners()
SimpleListenablehasListeners in interface SimpleListenablepublic void interruptEvents()
WorkProgressinterruptEvents in interface WorkProgresspublic void resumeEvents(boolean trigger)
WorkProgressresumeEvents in interface WorkProgressCopyright © 2019. All rights reserved.