|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread de.lmu.ifi.dbs.elki.visualization.visualizers.thumbs.ThumbnailThread
public class ThumbnailThread
Thread to render thumbnails in the background.
Nested Class Summary | |
---|---|
static interface |
ThumbnailThread.Listener
Listener interface for completed thumbnails. |
static class |
ThumbnailThread.Task
A single thumbnailer task. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private Queue<ThumbnailThread.Task> |
queue
Queue of thumbnails to generate. |
private boolean |
shutdown
Flag to signal shutdown. |
private Thumbnailer |
t
Thumbnailer to use. |
private static ThumbnailThread |
THREAD
The static thumbnail thread. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ThumbnailThread()
|
Method Summary | |
---|---|
private void |
generateThumbnail(ThumbnailThread.Task ti)
Generate a single Thumbnail. |
static ThumbnailThread.Task |
QUEUE(ThumbnailThread.Listener callback)
Queue a thumbnail task in a global thumbnail thread. |
private void |
queue(ThumbnailThread.Task task)
Queue a new thumbnail task. |
void |
run()
|
private void |
shutdown()
Set the shutdown flag. |
static void |
SHUTDOWN()
Shutdown the thumbnailer thread. |
static void |
UNQUEUE(ThumbnailThread.Task task)
Remove a pending task from the queue. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Queue<ThumbnailThread.Task> queue
private boolean shutdown
private Thumbnailer t
private static ThumbnailThread THREAD
Constructor Detail |
---|
public ThumbnailThread()
Method Detail |
---|
public static ThumbnailThread.Task QUEUE(ThumbnailThread.Listener callback)
callback
- Callbackpublic static void UNQUEUE(ThumbnailThread.Task task)
task
- Task to remove.public static void SHUTDOWN()
private void queue(ThumbnailThread.Task task)
task
- Thumbnail taskprivate void generateThumbnail(ThumbnailThread.Task ti)
ti
- Visualization taskpublic void run()
run
in interface Runnable
run
in class Thread
private void shutdown()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |