public abstract class SwingWorker extends Object
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/language
License of use: Lesser
General Public License (LGPL) , no warranty
Modifier and Type | Field and Description |
---|---|
protected nl.tudelft.simulation.language.swing.SwingWorker.ThreadVar |
threadVar
the thread to use.
|
Constructor and Description |
---|
SwingWorker()
Start a thread that will call the
construct method and
then exit. |
Modifier and Type | Method and Description |
---|---|
abstract Object |
construct() |
void |
finished()
Called on the event dispatching thread (not on the worker thread) after
the
construct method has returned. |
Object |
get()
Return the value created by the
construct method. |
protected Object |
getValue() |
void |
interrupt()
A new method that interrupts the worker thread.
|
protected void |
setValue(Object x)
Set the value produced by worker thread
|
void |
start()
Start the worker thread.
|
protected nl.tudelft.simulation.language.swing.SwingWorker.ThreadVar threadVar
public SwingWorker()
construct
method and
then exit.protected Object getValue()
protected void setValue(Object x)
x
- the valuepublic abstract Object construct()
get
method.public void finished()
construct
method has returned.public void interrupt()
public Object get()
construct
method. Returns
null if either the constructing thread or the current thread was
interrupted before a value was produced.construct
methodpublic void start()
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.