com.lowagie.toolbox.swing

Class EventDispatchingThread

public abstract class EventDispatchingThread extends Object

Since: 2.1.1 (imported from itexttoolbox project)

Nested Class Summary
static classEventDispatchingThread.ThreadWrapper
Inner class that holds the reference to the thread.
Field Summary
EventDispatchingThread.ThreadWrapperthread
A wrapper for the tread that executes a time-consuming task.
Objectvalue
The value of an object constructed by the construct() method.
Constructor Summary
EventDispatchingThread()
Starts a thread.
Method Summary
abstract Objectconstruct()
Implement this class; the time-consuming task will go here.
voidfinished()
Called on the event dispatching thread once the construct method has finished its task.
Objectget()
Returns the value created by the construct method.
voidinterrupt()
Forces the thread to stop what it's doing.
voidstart()
Starts the thread.

Field Detail

thread

private EventDispatchingThread.ThreadWrapper thread
A wrapper for the tread that executes a time-consuming task.

value

private Object value
The value of an object constructed by the construct() method.

Constructor Detail

EventDispatchingThread

public EventDispatchingThread()
Starts a thread. Executes the time-consuming task in the construct method; finally calls the finish().

Method Detail

construct

public abstract Object construct()
Implement this class; the time-consuming task will go here.

Returns: Object

finished

public void finished()
Called on the event dispatching thread once the construct method has finished its task.

get

public Object get()
Returns the value created by the construct method.

Returns: the value created by the construct method or null if the task was interrupted before it was finished.

interrupt

public void interrupt()
Forces the thread to stop what it's doing.

start

public void start()
Starts the thread.