org.jdesktop.swingx.event
Interface BackgroundListener

All Superinterfaces:
EventListener

public interface BackgroundListener
extends EventListener

The Event Handler listener for the BackgroundWorker. The various methods in this interface are called at various points in the processing of the background task.


Method Summary
 void doInBackground(BackgroundEvent evt)
          Always called on a background thread.
 void done(BackgroundEvent evt)
          Always called on the EDT when all background work as finished
 void process(BackgroundEvent evt)
          Always called on the EDT.
 void started(BackgroundEvent evt)
          Always called on the EDT right before the background task actually begins.
 

Method Detail

started

void started(BackgroundEvent evt)
Always called on the EDT right before the background task actually begins.


doInBackground

void doInBackground(BackgroundEvent evt)
Always called on a background thread. This is the method that all long running tasks are placed in. If you need to update the Swing GUI, you may call the setProgress/setProgressPercent methods on BackgroundWorker, or you may call the publish method on BackgroundWorker to cause some data to be passed to the GUI.


done

void done(BackgroundEvent evt)
Always called on the EDT when all background work as finished


process

void process(BackgroundEvent evt)
Always called on the EDT. This method may be called many times during the processing of the background task (depending on how many times the doInBackground method calls publish). This method will be called concurrently with work going on in the doInBackground method.