fulmine.ui
Class SwingWorker<T>

java.lang.Object
  extended by fulmine.ui.SwingWorker<T>
All Implemented Interfaces:
Runnable

public abstract class SwingWorker<T>
extends Object
implements Runnable

A worker object run by the AWT thread

Author:
Ramon Servadei

Constructor Summary
SwingWorker()
           
 
Method Summary
abstract  T doWork()
          Overridden by subclasses to perform the work
 T getResult()
          Get the result
 SwingWorker<T> invokeAndWait()
          Cause the worker to execute on the AWT thread.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingWorker

public SwingWorker()
Method Detail

run

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

getResult

public final T getResult()
Get the result

Returns:
the result

invokeAndWait

public final SwingWorker<T> invokeAndWait()
Cause the worker to execute on the AWT thread. This blocks until the AWT thread executes this and a result is available.


doWork

public abstract T doWork()
                  throws Exception
Overridden by subclasses to perform the work

Returns:
the output of the work
Throws:
Exception


Copyright © 2007-2009. All Rights Reserved.