com.ngs.image.source
Class ImageIOSource

java.lang.Object
  extended by com.ngs.image.ImageSource
      extended by com.ngs.image.source.DefaultThumbnailSource
          extended by com.ngs.image.source.ImageIOSource

public class ImageIOSource
extends DefaultThumbnailSource

This source uses ImageIO to load Images.


Constructor Summary
ImageIOSource()
           
ImageIOSource(File f)
           
ImageIOSource(ImageInputStream stream)
           
ImageIOSource(InputStream stream)
           
ImageIOSource(URL url)
           
 
Method Summary
 void dispose()
          Implements ImageSource
 BufferedImage getImage()
           
 BufferedImage getImage(int index)
          Implements ImageSource
 int getImageCount()
          Implements ImageSource
 String getImageName()
          Implements ImageSource
 void setImageName(String name)
           
 
Methods inherited from class com.ngs.image.source.DefaultThumbnailSource
getThumbnail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOSource

public ImageIOSource()

ImageIOSource

public ImageIOSource(File f)
              throws IOException
Throws:
IOException

ImageIOSource

public ImageIOSource(URL url)
              throws IOException
Throws:
IOException

ImageIOSource

public ImageIOSource(ImageInputStream stream)
              throws IOException
Throws:
IOException

ImageIOSource

public ImageIOSource(InputStream stream)
              throws IOException
Throws:
IOException
Method Detail

getImage

public BufferedImage getImage()

getImage

public BufferedImage getImage(int index)
Description copied from class: DefaultThumbnailSource
Implements ImageSource

Specified by:
getImage in class DefaultThumbnailSource
Parameters:
index - The image to obtain from this ImageSource.
Returns:
a BufferedImage.

getImageName

public String getImageName()
Description copied from class: DefaultThumbnailSource
Implements ImageSource

Specified by:
getImageName in class DefaultThumbnailSource

setImageName

public void setImageName(String name)

getImageCount

public int getImageCount()
Description copied from class: DefaultThumbnailSource
Implements ImageSource

Specified by:
getImageCount in class DefaultThumbnailSource
Returns:
THe number of images in this ImageSource. Normally this will be 1.

dispose

public void dispose()
Description copied from class: DefaultThumbnailSource
Implements ImageSource

Specified by:
dispose in class DefaultThumbnailSource