public final class SWTUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
safeAsyncExec(Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next
reasonable opportunity.
|
static void |
safeRedraw(Control control,
boolean async)
Run
Control.redraw() on the given viewer. |
static void |
safeRefresh(Viewer viewer,
boolean async,
boolean checkDisposed)
Run
Viewer.refresh() on the given viewer. |
static void |
safeSyncExec(Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next
reasonable opportunity.
|
public static void safeAsyncExec(Runnable runnable)
runnable
- runnable code to run on the user-interface thread.public static void safeSyncExec(Runnable runnable)
runnable
- runnable code to run on the user-interface thread.public static void safeRefresh(Viewer viewer, boolean async, boolean checkDisposed)
Viewer.refresh()
on the given viewer.viewer
- the viewer to refresh.async
- whether the thread which calls this method is not suspended until the runnable completes.checkDisposed
- whether the viewer's control dispose state has to be checked before refresh.public static void safeRedraw(Control control, boolean async)
Control.redraw()
on the given viewer.redraw
- the control to redraw.async
- whether the thread which calls this method is not suspended until the runnable completes.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.