Class TestDispatcher

    • Constructor Detail

      • TestDispatcher

        public TestDispatcher()
        The constructor.
    • 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 method invokes the given task asynchronous in the dispatcher thread of the UI. The term "asynchronous" means that this method may return before the task is invoked. If there is NO dispatcher thread in the underlying UI implementation, the task may simply be invoked directly in the implementation of this method.
        Parameters:
        task - is the job to invoke.
      • invokeTimer

        public void invokeTimer​(Runnable task,
                                int delayMilliseconds)
        Description copied from interface: UiDispatcher
        This method invokes the given task once asynchronous after the given dalay.
        Parameters:
        task - is the job to invoke.
        delayMilliseconds - is the delay in milliseconds when the task shall be executed.
      • invokeTimer

        public void invokeTimer​(Callable<Boolean> task,
                                int delayMilliseconds)
        Description copied from interface: UiDispatcher
        This method invokes the given task periodically. The first invocation is performed after the given delay. Every time the task returns true, another invocation is performed after the same delay until false is returned.
        Parameters:
        task - is the job to invoke.
        delayMilliseconds - is the periodically delay in milliseconds when the task shall be executed.