defaultEDTPollPeriod| Constructor and Description |
|---|
SWTEDTUtil(org.eclipse.swt.widgets.Display swtDisplay) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.swt.widgets.Display |
getDisplay() |
long |
getPollPeriod() |
void |
invoke(boolean wait,
Runnable task)
Append task to the EDT task queue.
Wait until execution is finished if wait == true.Shall start the thread if not running. Can be issued from within EDT, ie from within an enqueued task. |
void |
invokeStop(Runnable finalTask)
Append the final task to the EDT task queue,
signals EDT to stop and wait until stopped.
Due to the nature of this method: All previous queued tasks will be finished. No new tasks are allowed, an Exception is thrown. Can be issued from within EDT, ie from within an enqueued task. EDTUtil.reset() may follow immediately, ie creating a new EDT
|
boolean |
isCurrentThreadEDT() |
boolean |
isRunning() |
void |
reset()
Create a new EDT.
|
void |
setPollPeriod(long ms) |
void |
start()
Start the EDT
|
void |
waitUntilIdle()
Wait until the EDT task queue is empty.
The last task may still be in execution when this method returns. |
void |
waitUntilStopped()
Wait until EDT task is stopped.
No stop action is performed, EDTUtil.invokeStop(java.lang.Runnable) should be used before. |
public final org.eclipse.swt.widgets.Display getDisplay()
public long getPollPeriod()
getPollPeriod in interface EDTUtilpublic void setPollPeriod(long ms)
setPollPeriod in interface EDTUtilms - poll period in millisecondspublic void reset()
EDTUtilreset()invokeStop(..) in case another start() or invoke(..)
is expected.reset in interface EDTUtilEDTUtil.start(),
EDTUtil.invoke(boolean, java.lang.Runnable),
EDTUtil.invokeStop(java.lang.Runnable)public void start()
EDTUtilpublic boolean isCurrentThreadEDT()
isCurrentThreadEDT in interface EDTUtilpublic boolean isRunning()
public void invokeStop(Runnable finalTask)
EDTUtilEDTUtil.reset() may follow immediately, ie creating a new EDTinvokeStop in interface EDTUtilpublic void invoke(boolean wait,
Runnable task)
EDTUtilwait == true.public void waitUntilIdle()
EDTUtilwaitUntilIdle in interface EDTUtilpublic void waitUntilStopped()
EDTUtilstop action is performed, EDTUtil.invokeStop(java.lang.Runnable) should be used before.waitUntilStopped in interface EDTUtilCopyright 2010 JogAmp Community.