Class ImageLoader


public class ImageLoader
extends java.lang.Thread

Image loader is a class that places load requests for new images in a new thread so that the UI does not lock up when a file takes long to load. This also means that the user interface must take mesures to insure that no changes are applied while loading. (Though they should not cause any crashes in RdfPicCore).

Field Summary
(package private)  RdfPicCore core
(package private)  boolean quitNow
(package private)  boolean syncNeeded
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
Constructor Summary
ImageLoader(RdfPicCore core)
          Creates a new ImageLoader.
Method Summary
(package private)  void quit()
          Shuts down load thread.
(package private)  void reload()
          Puts a load request.
 void run()
          Starts the loading thread, in which load requests will later execute.
private  void sync()
          Synchronizes image - finish loading.
private  void syncLoop()
          Waits until something happens, process it, and start over...
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


RdfPicCore core


boolean syncNeeded


boolean quitNow
Constructor Detail


public ImageLoader(RdfPicCore core)
Creates a new ImageLoader.
core - The core to interact with.
Method Detail


public void run()
Starts the loading thread, in which load requests will later execute.
run in class java.lang.Thread


private void syncLoop()
Waits until something happens, process it, and start over...


private void sync()
Synchronizes image - finish loading.


void quit()
Shuts down load thread. (IDEA deamon thread easier - maybe io problems though?)


void reload()
Puts a load request. The active image will be (re)loaded.