Added dispatch method for SWT

This commit is contained in:
nathan 2016-09-22 22:33:16 +02:00
parent 6c9aff3529
commit 3488646034
3 changed files with 5 additions and 0 deletions

Binary file not shown.

View File

@ -28,6 +28,11 @@ import org.eclipse.swt.widgets.Listener;
*/
public
class Swt {
public static
void dispatch(final Runnable runnable) {
Display.getDefault().asyncExec(runnable);
}
public static
void onShutdown(final Runnable runnable) {
Display.getCurrent().getShells()[0].addListener(SWT.Close, new Listener() {