Class SwingWorkerTask

java.lang.Object
  extended by SwingWorkerTask
All Implemented Interfaces:
java.lang.Runnable

public abstract class SwingWorkerTask
extends java.lang.Object
implements java.lang.Runnable

Extend this class to define an asynchronous task that updates a Swing UI.


Constructor Summary
SwingWorkerTask()
           
 
Method Summary
 void finish()
          Override this method for UI operations after work is completed.
 void init()
          Override this method for UI operations before work commences.
 void run()
           
 void update()
          Override this method for UI operations after each unit or work.
abstract  void work()
          Place your task in this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingWorkerTask

public SwingWorkerTask()
Method Detail

work

public abstract void work()
                   throws java.lang.InterruptedException
Place your task in this method. Be sure to call doUpdate(), not update(), to show the update after each unit of work.

Throws:
java.lang.InterruptedException

init

public void init()
Override this method for UI operations before work commences.


update

public void update()
Override this method for UI operations after each unit or work.


finish

public void finish()
Override this method for UI operations after work is completed.


run

public final void run()
Specified by:
run in interface java.lang.Runnable