ur_rna.RNAstructureUI.utilities

## Class BackgroundWorker

- java.lang.Object
- - javax.swing.SwingWorker<java.lang.Void,java.lang.Void>
  - - ur_rna.RNAstructureUI.utilities.BackgroundWorker

- All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>, java.util.concurrent.RunnableFuture<java.lang.Void>, java.util.EventListener

      public abstract class BackgroundWorker
      extends javax.swing.SwingWorker<java.lang.Void,java.lang.Void>
      implements java.beans.PropertyChangeListener

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BackgroundWorker.ErrorInfo`
    `static class` | `BackgroundWorker.StateChangeEventArgs`

    - ### Nested classes/interfaces inherited from class javax.swing.SwingWorker

      `javax.swing.SwingWorker.StateValue`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_UPDATE_INTERVAL`
    `private java.util.ArrayList<BackgroundWorker.ErrorInfo>` | `errors`
    `EventSource.TwoArgs<BackgroundWorker,java.lang.Integer>` | `ProgressChange`
    `protected boolean` | `progressIndeterminate`
    `EventSource.TwoArgs<BackgroundWorker,BackgroundWorker.StateChangeEventArgs>` | `StateChange`
    `protected java.lang.String` | `status`
    `EventSource.TwoArgs<BackgroundWorker,java.lang.String>` | `StatusChange`
    `EventSource.OneArg<BackgroundWorker>` | `WorkDone`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackgroundWorker()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Void` | `doInBackground()`
    `java.lang.String` | `getErrorMessages()`
    `java.util.List<BackgroundWorker.ErrorInfo>` | `getErrors()`
    `java.lang.String` | `getStatus()`
    `boolean` | `hadErrors()`
    `boolean` | `isProgressIndeterminate()`
    `protected void` | `process(java.util.List<java.lang.Void> chunks)` Receives data chunks from the `publish` method asynchronously on the Event Dispatch Thread.
    `protected void` | `processOutput(java.lang.Object o)`
    `protected void` | `progressChanged(int percent)`
    `void` | `propertyChange(java.beans.PropertyChangeEvent evt)`
    `void` | `setError(java.lang.Exception ex)`
    `void` | `setError(java.lang.String message)`
    `void` | `setError(java.lang.String message, java.lang.Exception ex)`
    `void` | `setProgressIndeterminate(boolean isIndeterminate)`
    `void` | `setStatus(java.lang.String status)`
    `protected void` | `stateChanged(javax.swing.SwingWorker.StateValue oldState, javax.swing.SwingWorker.StateValue state)`
    `protected void` | `statusChanged(java.lang.String status)`
    `abstract void` | `work()`

    - ### Methods inherited from class javax.swing.SwingWorker

      `addPropertyChangeListener, cancel, done, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_UPDATE_INTERVAL

          public static final int DEFAULT_UPDATE_INTERVAL

      See Also:
        Constant Field Values

    - #### errors

          private final java.util.ArrayList<BackgroundWorker.ErrorInfo> errors

    - #### ProgressChange

          public final EventSource.TwoArgs<BackgroundWorker,java.lang.Integer> ProgressChange

    - #### progressIndeterminate

          protected boolean progressIndeterminate

    - #### StateChange

          public final EventSource.TwoArgs<BackgroundWorker,BackgroundWorker.StateChangeEventArgs> StateChange

    - #### status

          protected java.lang.String status

    - #### StatusChange

          public final EventSource.TwoArgs<BackgroundWorker,java.lang.String> StatusChange

    - #### WorkDone

          public final EventSource.OneArg<BackgroundWorker> WorkDone

  - ### Constructor Detail

    - #### BackgroundWorker

          public BackgroundWorker()

  - ### Method Detail

    - #### doInBackground

          protected java.lang.Void doInBackground()

      Specified by:
        `doInBackground` in class `javax.swing.SwingWorker<java.lang.Void,java.lang.Void>`

    - #### getErrorMessages

          public java.lang.String getErrorMessages()

    - #### getErrors

          public java.util.List<BackgroundWorker.ErrorInfo> getErrors()

    - #### getStatus

          public java.lang.String getStatus()

    - #### hadErrors

          public boolean hadErrors()

    - #### isProgressIndeterminate

          public boolean isProgressIndeterminate()

    - #### process

          protected void process(java.util.List<java.lang.Void> chunks)

      Receives data chunks from the `publish` method asynchronously on the Event Dispatch Thread.

      Please refer to the `SwingWorker.publish(V...)` method for more details.

      Overrides:
        `process` in class `javax.swing.SwingWorker<java.lang.Void,java.lang.Void>`
      Parameters:
        `chunks` - intermediate results to process
      See Also:
        `SwingWorker.publish(V...)`

    - #### processOutput

          protected void processOutput(java.lang.Object o)

    - #### progressChanged

          protected void progressChanged(int percent)

    - #### propertyChange

          public void propertyChange(java.beans.PropertyChangeEvent evt)

      Specified by:
        `propertyChange` in interface `java.beans.PropertyChangeListener`

    - #### setError

          public void setError(java.lang.Exception ex)

    - #### setError

          public void setError(java.lang.String message)

    - #### setError

          public void setError(java.lang.String message,
                               java.lang.Exception ex)

    - #### setProgressIndeterminate

          public void setProgressIndeterminate(boolean isIndeterminate)

    - #### setStatus

          public void setStatus(java.lang.String status)

    - #### stateChanged

          protected void stateChanged(javax.swing.SwingWorker.StateValue oldState,
                                      javax.swing.SwingWorker.StateValue state)

    - #### statusChanged

          protected void statusChanged(java.lang.String status)

    - #### work

          public abstract void work()