|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.ui.util.MonitoredOperation
public abstract class MonitoredOperation
An operation that can be tracked with a progress bar. This operation can be called
from any thread, UI or non-UI, and adds only very little overhead for progress
tracking compared to the usual synchronous tracking of the workbench progress service.
Just implement execute(IProgressMonitor)
and call runMonitored()
.
Constructor Summary | |
---|---|
MonitoredOperation()
|
Method Summary | |
---|---|
protected abstract IStatus |
execute(IProgressMonitor monitor)
Execute the monitored operation. |
IStatus |
getStatus()
Returns the status of the last operation run. |
protected void |
postUIexec(IStatus status)
Executed in the UI thread after the operation has ended. |
protected void |
preUIexec()
Executed in the UI thread before the operation starts. |
static void |
runInUI(Runnable runnable,
boolean synch)
Execute the given runnable in the UI thread. |
void |
runMonitored()
Run the operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MonitoredOperation()
Method Detail |
---|
protected abstract IStatus execute(IProgressMonitor monitor)
monitor
- the progress monitor for the operation
null
protected void preUIexec()
protected void postUIexec(IStatus status)
status
- the status returned by execute(IProgressMonitor)
public final void runMonitored()
public IStatus getStatus()
null
if the operation has not
run yetpublic static final void runInUI(Runnable runnable, boolean synch)
runnable
- a runnablesynch
- if true or if the current thread is the UI thread, the method returns
only after execution of the runnable, else it returns immediately
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |