igeo.gui
Class IImageLoader

java.lang.Object
  extended by igeo.gui.IImageLoader
All Implemented Interfaces:
java.awt.image.ImageObserver

public class IImageLoader
extends java.lang.Object
implements java.awt.image.ImageObserver

Class to provide function to load image from external file into Java AWT Image object.

Author:
Satoru Sugihara

Field Summary
static boolean convertFilePath
           
static IImageLoader observer
           
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IImageLoader()
           
 
Method Summary
static java.awt.image.BufferedImage createImage(int[][] pixel)
           
static java.awt.Color getColor(int[] pixel, int x, int y, int w)
           
static java.awt.Image getImage(java.lang.String filename)
           
static java.awt.Image getImage(java.lang.String filename, java.awt.Component component)
           
static int[] getPixelBuffer(java.awt.Image image)
           
static int[][] getPixelMatrix(java.awt.Image image)
           
static java.awt.Color[][] getPixels(java.awt.Image image)
           
static java.awt.Color[][] getPixels(int[] pixelBuf, int width, int height)
           
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

observer

public static final IImageLoader observer

convertFilePath

public static boolean convertFilePath
Constructor Detail

IImageLoader

public IImageLoader()
Method Detail

getImage

public static java.awt.Image getImage(java.lang.String filename)

getImage

public static java.awt.Image getImage(java.lang.String filename,
                                      java.awt.Component component)

getPixelBuffer

public static int[] getPixelBuffer(java.awt.Image image)

getPixelMatrix

public static int[][] getPixelMatrix(java.awt.Image image)

getPixels

public static java.awt.Color[][] getPixels(java.awt.Image image)

getPixels

public static java.awt.Color[][] getPixels(int[] pixelBuf,
                                           int width,
                                           int height)

getColor

public static java.awt.Color getColor(int[] pixel,
                                      int x,
                                      int y,
                                      int w)

createImage

public static java.awt.image.BufferedImage createImage(int[][] pixel)

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver