Class SwtExec.Guarded

java.lang.Object
com.diffplug.common.rx.GuardedExecutor
com.diffplug.common.swt.SwtExec.Guarded
All Implemented Interfaces:
RxSubscriber, Executor
Enclosing class:
SwtExec

public static class SwtExec.Guarded extends GuardedExecutor
Executor and Rx for conducting actions which are guarded on an SWT widget. Obtained via SwtExec.guardOn(Widget) or SwtExec.guardOn(ControlWrapper).

 SwtExec.Guarded guarded = SwtExec.immediate().guardOn(textBox);
 // guaranteed to not cause "Widget is disposed" errors
 guarded.subscribe(serverResponse, txt -> textBox.setText(text));
 
See Also: