- 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 ofUiDispatcher
for TeaVM.
-
-
Constructor Summary
Constructors Constructor Description TvmDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invokeAsynchron(Runnable task)
This methodinvokes
the giventask
asynchronous in the dispatcher thread of the UI.void
invokeTimer(Runnable task, int delayMilliseconds)
This methodinvokes
the giventask
once asynchronous after the given dalay.void
invokeTimer(Callable<Boolean> task, int delayMilliseconds)
This methodinvokes
the giventask
periodically.boolean
isDispatchThread()
-
Methods inherited from class io.github.mmm.ui.spi.AbstractUiDispatcher
invokeUiTask
-
-
-
-
Method Detail
-
isDispatchThread
public boolean isDispatchThread()
- Returns:
true
if this method was invoked within the dispatcher thread of the underlying UI toolkit,false
otherwise.
-
invokeAsynchron
public void invokeAsynchron(Runnable task)
Description copied from interface:UiDispatcher
This methodinvokes
the giventask
asynchronous in the dispatcher thread of the UI. The term "asynchronous" means that this method may return before thetask
is invoked. If there is NO dispatcher thread in the underlying UI implementation, thetask
may 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:UiDispatcher
This methodinvokes
the giventask
once asynchronous after the given dalay.- Parameters:
task
- is the job toinvoke
.delayMilliseconds
- is the delay in milliseconds when thetask
shall be executed.
-
invokeTimer
public void invokeTimer(Callable<Boolean> task, int delayMilliseconds)
Description copied from interface:UiDispatcher
This methodinvokes
the giventask
periodically. The firstinvocation
is performed after the given delay. Every time thetask
returnstrue
, anotherinvocation
is performed after the same delay untilfalse
is returned.- Parameters:
task
- is the job toinvoke
.delayMilliseconds
- is the periodically delay in milliseconds when thetask
shall be executed.
-
-