Class PamWorker<T>

java.lang.Object
PamUtils.worker.PamWorker<T>

public class PamWorker<T> extends Object
Wrapper around a SwingWorker so it's easy to launch a background thread that will update a modal dialog with a progress bar and some text
Author:
Doug Gillespie
  • Constructor Details

    • PamWorker

      public PamWorker(PamWorkWrapper<T> pamWorkWrapper, Window parentFrame, int nTextRows, String title)
      Parameters:
      pamWorkWrapper - wrapper round callback and worker functions
      parentFrame - parent frame of progress dialog
      nTextRows - number of rows of text for progress messages
      title - dialog title
    • PamWorker

      public PamWorker(PamWorkWrapper<T> pamWorkWrapper)
      Create a PamWorker without a swing dialog.
      Parameters:
      pamWorkWrapper - wrapper round callback and worker functions
      parentFrame - parent frame of progress dialog
      nTextRows - number of rows of text for progress messages
      title - dialog title
  • Method Details

    • start

      public boolean start()
      Start the worker thread.
      Returns:
      true of the thread is started. flase if the thread is done, cancelled or running.
    • getBackgroundWorker

      public PamWorker<T>.BackgroundWorker getBackgroundWorker()
    • update

      public void update(PamWorkProgressMessage progressMessage)
    • getPamWorkProgress

      public PamWorkerProgressFX getPamWorkProgress()
      Get the PAM progress property.
      Returns:
      class with the progress properties of the worker.