Package org.openpdf.toolbox.swing
Class EventDispatchingThread
java.lang.Object
org.openpdf.toolbox.swing.EventDispatchingThread
- Since:
- 2.1.1 (imported from itexttoolbox project)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInner class that holds the reference to the thread. -
Field Summary
FieldsModifier and TypeFieldDescriptionA wrapper for the tread that executes a time-consuming task.private ObjectThe value of an object constructed by the construct() method. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectImplement this class; the time-consuming task will go here.voidfinished()Called on the event dispatching thread once the construct method has finished its task.get()Returns the value created by the construct method.voidForces the thread to stop what it's doing.voidstart()Starts the thread.
-
Field Details
-
value
The value of an object constructed by the construct() method. -
thread
A wrapper for the tread that executes a time-consuming task.
-
-
Constructor Details
-
EventDispatchingThread
public EventDispatchingThread()Starts a thread. Executes the time-consuming task in the construct method; finally calls the finish().
-
-
Method Details
-
construct
Implement this class; the time-consuming task will go here.- Returns:
- Object
-
start
public void start()Starts the thread. -
interrupt
public void interrupt()Forces the thread to stop what it's doing. -
finished
public void finished()Called on the event dispatching thread once the construct method has finished its task. -
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.
-