javax.swing.text

Class LayoutQueue

public class LayoutQueue extends Object

This is a queue which holds {@link Runnable} objects. It is intended for deferring layout operations.
Constructor Summary
LayoutQueue()
Create a new layout queue.
Method Summary
voidaddTask(Runnable task)
Add a layout task to the queue.
static LayoutQueuegetDefaultQueue()
Return the default layout queue.
static voidsetDefaultQueue(LayoutQueue q)
Set the default layout queue.
protected RunnablewaitForWork()
Called by a worker thread to retrieve the next layout task.

Constructor Detail

LayoutQueue

public LayoutQueue()
Create a new layout queue.

Method Detail

addTask

public void addTask(Runnable task)
Add a layout task to the queue.

getDefaultQueue

public static LayoutQueue getDefaultQueue()
Return the default layout queue.

setDefaultQueue

public static void setDefaultQueue(LayoutQueue q)
Set the default layout queue.

waitForWork

protected Runnable waitForWork()
Called by a worker thread to retrieve the next layout task. This will block until a new task is available. This method will return null if the thread is interrupted while waiting.