Class ProgressMonitorSwingWorker<T,​V>

  • All Implemented Interfaces:
    Runnable, Future<T>, RunnableFuture<T>

    public abstract class ProgressMonitorSwingWorker<T,​V>
    extends SwingWorker<T,​V>
    A swing worker which may pop-up a progress monitor dialog.
    • Constructor Detail

      • ProgressMonitorSwingWorker

        protected ProgressMonitorSwingWorker​(Component parentComponent,
                                             String title)
    • Method Detail

      • doInBackground

        protected abstract T doInBackground​(ProgressMonitor pm)
                                     throws Exception
        Computes a result, or throws an exception if unable to do so.

        Note that this method is executed only once in a background thread.

        Parameters:
        pm - the progress monitor
        Returns:
        the computed result
        Throws:
        Exception - if unable to compute a result
      • executeWithBlocking

        public final void executeWithBlocking()
        Similar to the SwingWorker.execute() method, but blocks the current thread until this worker computed its result. However, this method will not block the Event Dispatch Thread.