- java.lang.Object
-
- io.github.mmm.ui.spi.AbstractUiDispatcher
-
- io.github.mmm.ui.tvm.TvmDispatcher
-
- All Implemented Interfaces:
UiDispatcher
public class TvmDispatcher extends AbstractUiDispatcher
Implementation ofUiDispatcherfor TeaVM.
-
-
Constructor Summary
Constructors Constructor Description TvmDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinvokeAsynchron(Runnable task)This methodinvokesthe giventaskasynchronous in the dispatcher thread of the UI.voidinvokeTimer(Runnable task, int delayMilliseconds)This methodinvokesthe giventaskonce asynchronous after the given dalay.voidinvokeTimer(Callable<Boolean> task, int delayMilliseconds)This methodinvokesthe giventaskperiodically.booleanisDispatchThread()-
Methods inherited from class io.github.mmm.ui.spi.AbstractUiDispatcher
invokeUiTask
-
-
-
-
Method Detail
-
isDispatchThread
public boolean isDispatchThread()
- Returns:
trueif this method was invoked within the dispatcher thread of the underlying UI toolkit,falseotherwise.
-
invokeAsynchron
public void invokeAsynchron(Runnable task)
Description copied from interface:UiDispatcherThis methodinvokesthe giventaskasynchronous in the dispatcher thread of the UI. The term "asynchronous" means that this method may return before thetaskis invoked. If there is NO dispatcher thread in the underlying UI implementation, thetaskmay simply be invoked directly in the implementation of this method.- Parameters:
task- is the job toinvoke.
-
invokeTimer
public void invokeTimer(Runnable task, int delayMilliseconds)
Description copied from interface:UiDispatcherThis methodinvokesthe giventaskonce asynchronous after the given dalay.- Parameters:
task- is the job toinvoke.delayMilliseconds- is the delay in milliseconds when thetaskshall be executed.
-
invokeTimer
public void invokeTimer(Callable<Boolean> task, int delayMilliseconds)
Description copied from interface:UiDispatcherThis methodinvokesthe giventaskperiodically. The firstinvocationis performed after the given delay. Every time thetaskreturnstrue, anotherinvocationis performed after the same delay untilfalseis returned.- Parameters:
task- is the job toinvoke.delayMilliseconds- is the periodically delay in milliseconds when thetaskshall be executed.
-
-