|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.rups.model.BackgroundTask
public abstract class BackgroundTask
Allows you to perform long lasting tasks in background. If we ever move to Java 6, we should use the SwingWorker class (included in the JDK) instead of this custom Event Dispatching code.
Nested Class Summary | |
---|---|
private static class |
BackgroundTask.ThreadWrapper
Inner class that holds the reference to the thread. |
Field Summary | |
---|---|
private BackgroundTask.ThreadWrapper |
thread
A wrapper for the tread that executes a time-consuming task. |
Constructor Summary | |
---|---|
BackgroundTask()
Starts a thread. |
Method Summary | |
---|---|
abstract void |
doTask()
Implement this class; the time-consuming task will go here. |
void |
finished()
Called on the event dispatching thread once the construct method has finished its task. |
void |
interrupt()
Forces the thread to stop what it's doing. |
void |
start()
Starts the thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private BackgroundTask.ThreadWrapper thread
Constructor Detail |
---|
public BackgroundTask()
Method Detail |
---|
public abstract void doTask()
public void start()
public void interrupt()
public void finished()
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |