|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
ImageScaleWorker
Worker class. Longlived thread implementation that read images from AlbumCreator until no more files are to be scaled, after which it self terminates gracefully
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
ImageScaleWorker(int workerId,
AlbumCreator album,
int maxSizeLarge,
int maxSizeThumb)
Generates the ImageScaleWorker object |
Method Summary | |
void |
run()
Keeps running while a) busy, and b) there are more images to fetch from AlbumCreator parent |
void |
scaleImage(java.io.File[] files)
Creates one thumbnail and one large sized copy of the source image. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ImageScaleWorker(int workerId, AlbumCreator album, int maxSizeLarge, int maxSizeThumb)
workerId
- Unique identifier for the worker used for printing funny messages to console logalbum
- Pointer to AlbumCreator that spawned the threadmaxSizeLarge
- Maximum image size (in either X or Y, whichever is larger)maxSizeThumb
- Maximum thumb size (in either X or Y, whichever is larger)Method Detail |
public void run()
public void scaleImage(java.io.File[] files)
files
- File objects containg where to read source image, and where to write target
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |