com.smartwerkz.jupload.classic.image
Class ImageLoadTask

java.lang.Object
  extended by com.smartwerkz.jupload.classic.util.concurrent.Task
      extended by com.smartwerkz.jupload.classic.image.ImageLoadTask

public abstract class ImageLoadTask
extends Task

Background task for loading images and creating thumbnails

Since:
25-Mar-2006, 1:34:28 AM
Author:
Dominik Seifert

Field Summary
protected  int h
           
protected  UploadImageFile uploadFile
           
protected  int w
           
 
Fields inherited from class com.smartwerkz.jupload.classic.util.concurrent.Task
cancelled, executor
 
Constructor Summary
ImageLoadTask(UploadImageFile uploadFile)
           
ImageLoadTask(UploadImageFile uploadFile, int w, int h)
           
 
Method Summary
 void execute()
           
abstract  void failed(UploadImageFile uploadFile, java.lang.Exception e)
           
 UploadImageFile getUploadFile()
           
 boolean isGuiTask()
          If true, loaded and failed will be executed from the Gui thread (SwingUtils.invokeLater) else the execution will just continue from the Executor thread.
abstract  void loaded(UploadImageFile uploadFile, java.awt.image.BufferedImage img)
           
 void perform()
          Will let the ImageCache's executor execute this task.
 
Methods inherited from class com.smartwerkz.jupload.classic.util.concurrent.Task
cancel, isCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uploadFile

protected UploadImageFile uploadFile

w

protected int w

h

protected int h
Constructor Detail

ImageLoadTask

public ImageLoadTask(UploadImageFile uploadFile)

ImageLoadTask

public ImageLoadTask(UploadImageFile uploadFile,
                     int w,
                     int h)
Method Detail

execute

public void execute()
Specified by:
execute in class Task

perform

public void perform()
Will let the ImageCache's executor execute this task.


getUploadFile

public UploadImageFile getUploadFile()

loaded

public abstract void loaded(UploadImageFile uploadFile,
                            java.awt.image.BufferedImage img)

failed

public abstract void failed(UploadImageFile uploadFile,
                            java.lang.Exception e)

isGuiTask

public boolean isGuiTask()
If true, loaded and failed will be executed from the Gui thread (SwingUtils.invokeLater) else the execution will just continue from the Executor thread. Returns false by default.



Copyright © 2007 smartwerkz.com. All Rights Reserved.