net.sf.jomic.comic
Class ComicImage

java.lang.Object
  extended by net.sf.jomic.comic.ComicImage

public class ComicImage
extends java.lang.Object

Image for one comic page.

The actual image data are not kept in memory, but can be obtained in demand using getImage() .

Author:
Thomas Aglassinger

Constructor Summary
ComicImage(java.io.File newFile)
          Creates a new comic image from newFile.
 
Method Summary
 java.lang.Throwable getError()
          Get the error that occured during getting the size or reading the image.
 java.io.File getFile()
          Get the file from which the image was read.
 int getHeight()
          Get the height of the image in pixels.
 java.awt.image.RenderedImage getImage()
          Get image for current page, read from file in cache.
 java.lang.String getName()
          Original name of the image as used in the archive (for example "page_17.jpg").
 int getWidth()
          Get the width of the image in pixels.
 boolean hasError()
          Did an error occur during getting the size or reading the image?
 boolean isDoublePage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComicImage

public ComicImage(java.io.File newFile)
Creates a new comic image from newFile.

Parameters:
newFile - file that contains the image in any format supported by ImageIO.
Method Detail

getError

public java.lang.Throwable getError()
Get the error that occured during getting the size or reading the image.


getFile

public java.io.File getFile()
Get the file from which the image was read.


getHeight

public int getHeight()
Get the height of the image in pixels.


getImage

public java.awt.image.RenderedImage getImage()
Get image for current page, read from file in cache.


getName

public java.lang.String getName()
Original name of the image as used in the archive (for example "page_17.jpg").


getWidth

public int getWidth()
Get the width of the image in pixels.


isDoublePage

public boolean isDoublePage()

hasError

public boolean hasError()
Did an error occur during getting the size or reading the image?