public class ViewLayoutQueue extends Object
LayoutQueue
with certain improvements.
Unlike the swing implementation this one uses a circular buffer so it does no shifting of the runnables in the vector.
The queue will shrink its size to 1/4 automatically if its size would be lower than 1/8 of currently allocated array.
Any view implementation wishing to perform asynchronous layout
may use ViewLayoutQueue.getDefaultQueue()
or create its own queue instance.
Constructor and Description |
---|
ViewLayoutQueue()
Construct a layout queue.
|
Modifier and Type | Method and Description |
---|---|
void |
addTask(Runnable task)
Add a task to the queue.
|
static ViewLayoutQueue |
getDefaultQueue()
Get the default layout queue.
|
static ViewLayoutQueue |
getSynchronousQueue() |
Thread |
getWorkerThread() |
public static ViewLayoutQueue getDefaultQueue()
public static ViewLayoutQueue getSynchronousQueue()
public Thread getWorkerThread()
public void addTask(Runnable task)