Groovy Documentation

org.jdesktop.swingx.event
[Java] Interface BackgroundListener


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.

Authors:
rbair


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.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

doInBackground

public 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

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


process

public 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.


started

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


 

Groovy Documentation