Methods Summary |
---|
public synchronized void | addTask(java.lang.Runnable task)Add a task that is not needed immediately because
the results are not believed to be visible.
if (worker == null) {
worker = new LayoutThread();
worker.start();
}
tasks.addElement(task);
notifyAll();
|
public static javax.swing.text.LayoutQueue | getDefaultQueue()Fetch the default layout queue.
if (defaultQueue == null) {
defaultQueue = new LayoutQueue();
}
return defaultQueue;
|
public static void | setDefaultQueue(javax.swing.text.LayoutQueue q)Set the default layout queue.
defaultQueue = q;
|
protected synchronized java.lang.Runnable | waitForWork()Used by the worker thread to get a new task to execute
while (tasks.size() == 0) {
try {
wait();
} catch (InterruptedException ie) {
return null;
}
}
Runnable work = (Runnable) tasks.firstElement();
tasks.removeElementAt(0);
return work;
|