forked from dorkbox/SystemTray
Added dispatch method for SWT
This commit is contained in:
parent
6c9aff3529
commit
3488646034
Binary file not shown.
Binary file not shown.
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user