APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text

public Class LayoutQueue

extends Object
Class Inheritance
Imports
java.util.Vector

A queue of text layout tasks.
Author
Timothy Prinzing
Since
1.3
See Also
AsyncBoxView

Field Summary

Modifier and TypeField and Description
private static LayoutQueue
private Vector<Runnable>
private Thread

Constructor Summary

AccessConstructor and Description
public
LayoutQueue()

Construct a layout queue.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
addTask(Runnable
the task to add to the queue
task
)

Add a task that is not needed immediately because the results are not believed to be visible.

public static LayoutQueue

Returns:

the default layout queue
getDefaultQueue
()

Fetch the default layout queue.

public static void
setDefaultQueue(LayoutQueue
the new queue.
q
)

Set the default layout queue.

protected synchronized Runnable

Returns:

a task from the queue
waitForWork
()

Used by the worker thread to get a new task to execute.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultQueueback to summary
private static LayoutQueue defaultQueue
tasksback to summary
private Vector<Runnable> tasks
workerback to summary
private Thread worker

Constructor Detail

LayoutQueueback to summary
public LayoutQueue()

Construct a layout queue.

Method Detail

addTaskback to summary
public synchronized void addTask(Runnable task)

Add a task that is not needed immediately because the results are not believed to be visible.

Parameters
task:Runnable

the task to add to the queue

getDefaultQueueback to summary
public static LayoutQueue getDefaultQueue()

Fetch the default layout queue.

Returns:LayoutQueue

the default layout queue

setDefaultQueueback to summary
public static void setDefaultQueue(LayoutQueue q)

Set the default layout queue.

Parameters
q:LayoutQueue

the new queue.

waitForWorkback to summary
protected synchronized Runnable waitForWork()

Used by the worker thread to get a new task to execute.

Returns:Runnable

a task from the queue