de.lmu.ifi.dbs.elki.visualization.visualizers.thumbs
Class ThumbnailThread

java.lang.Object
  extended by java.lang.Thread
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.thumbs.ThumbnailThread
All Implemented Interfaces:
Runnable

public class ThumbnailThread
extends Thread

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

queue

private Queue<ThumbnailThread.Task> queue
Queue of thumbnails to generate.


shutdown

private boolean shutdown
Flag to signal shutdown.


t

private Thumbnailer t
Thumbnailer to use.


THREAD

private static ThumbnailThread THREAD
The static thumbnail thread.

Constructor Detail

ThumbnailThread

public ThumbnailThread()
Method Detail

QUEUE

public static ThumbnailThread.Task QUEUE(ThumbnailThread.Listener callback)
Queue a thumbnail task in a global thumbnail thread.

Parameters:
callback - Callback

UNQUEUE

public static void UNQUEUE(ThumbnailThread.Task task)
Remove a pending task from the queue.

Parameters:
task - Task to remove.

SHUTDOWN

public static void SHUTDOWN()
Shutdown the thumbnailer thread.


queue

private void queue(ThumbnailThread.Task task)
Queue a new thumbnail task.

Parameters:
task - Thumbnail task

generateThumbnail

private void generateThumbnail(ThumbnailThread.Task ti)
Generate a single Thumbnail.

Parameters:
ti - Visualization task

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

shutdown

private void shutdown()
Set the shutdown flag.


Release 0.4.0 (2011-09-20_1324)