com.lc.util
Class SwingWorker

java.lang.Object
  |
  +--com.lc.util.SwingWorker

public abstract class SwingWorker
extends java.lang.Object

3rd version of the SwingWorker, an abstract class to override for GUI-related operation, in a dedicated thread.
This class has been imported from Sun's site. For more information, have a look at :
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

Version:
$Revision: 1.1.1.1 $ $Date: 2002/02/19 22:12:03 $
Author:
Laurent Caillette, Sun Microsystems

Constructor Summary
SwingWorker()
          Creates a thread which will call the construct method before ending.
 
Method Summary
abstract  java.lang.Object construct()
          Calculates the value to be returned by the get method.
 void finished()
          Called by the dispath thread, after the construct completed.
 java.lang.Object get()
          Returns the value created by the construct method.
protected  java.lang.Object getValue()
          Gets the value produced by the worker thread, or null if not produced yet.
 void interrupt()
          Forces the worker thread to interrupt.
 void start()
          Starts the worker thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingWorker

public SwingWorker()
Creates a thread which will call the construct method before ending.
Method Detail

getValue

protected java.lang.Object getValue()
Gets the value produced by the worker thread, or null if not produced yet.

construct

public abstract java.lang.Object construct()
Calculates the value to be returned by the get method.

finished

public void finished()
Called by the dispath thread, after the construct completed.

interrupt

public void interrupt()
Forces the worker thread to interrupt.

get

public java.lang.Object get()
Returns the value created by the construct method.
Returns:
null if the the worker thread, or the current thread, were interrupted before producing a value. The created value otherwise.

start

public void start()
Starts the worker thread.