Class ProgressWorker<T,​V>

  • Type Parameters:
    T - the type of result this ProgressWorker produces.
    V - the type of intermediate result produced by this worker
    All Implemented Interfaces:
    Runnable, Future<T>, RunnableFuture<T>

    public final class ProgressWorker<T,​V>
    extends SwingWorker<T,​V>
    A SwingWorker implementation. Note that instances of this class are not reusable.
     ProgressWorker.builder(this::performTask)
       .onStarted(this::displayDialog)
       .onDone(this::closeDialog)
       .onResult(this::handleResult)
       .onProgress(this::displayProgress)
       .onPublish(this::publishMessage)
       .onCancelled(this::displayCancelledMessage)
       .onException(this::displayException)
       .execute();
     
    See Also:
    builder(Task), builder(ProgressTask)