public class ImageLoaderThread
extends java.lang.Thread
Thread for loading images into the PovClipse Image View.
Images of type BMP, ICO, JPEG, JPG, GIF, PNG or TIFF can be loaded
directly, all others are tried to convert into a PNG using the
net.sourceforge.jiu.gui.awt.ToolkitLoader
library.
Constructor and Description |
---|
ImageLoaderThread(IniDocument iniDocument,
RenderThread renderThread,
PovclipseImageView imageView)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
prepareImageLoad(java.lang.String filename,
IProject project)
If the image is of type BMP, ICO, JPEG, JPG, GIF, PNG or TIFF
the filename of the image is returned.
|
void |
run() |
void |
showErrorImage(java.lang.String message)
Displays the standatd error image along with the given error message
at the image view.
|
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
public ImageLoaderThread(IniDocument iniDocument, RenderThread renderThread, PovclipseImageView imageView)
renderConfig
- The render config holding the file name to be loaded.renderThread
- The render thread for indicating the render process finalizationimageView
- The image view to be used for displaying the loaded image.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void showErrorImage(java.lang.String message)
message
- The error message to be displayed.public static java.lang.String prepareImageLoad(java.lang.String filename, IProject project) throws ImageFormatException
If the image is of type BMP, ICO, JPEG, JPG, GIF, PNG or TIFF the filename of the image is returned.
If the image is of an other type it's loaded using the
net.sourceforge.jiu.gui.awt.ToolkitLoader
library and
converted into a PNG image, which can be loaded afterwards.
filename
- The name (including the path) of the image to be loaded.project
- The project to be used for storing the temporary converted image (if necessary)ImageFormatException