net.sf.jomic.comic
Class ComicSheet

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

public class ComicSheet
extends java.lang.Object

A sheet containig 1 or 2 images, depending on the size of the images: if an image is wider than high, a sheet can contain only 1 image.

Sheets are used to render a the ComicView in two page mode. ComicImages are referred to by their index in the ComicViews internal ComicView[].

Author:
Thomas Aglassinger

Field Summary
static int NO_IMAGE
          Value to indicat that no image is assigned.
 
Constructor Summary
ComicSheet(int newPage, int newLeftImageIndex)
          Create a sheet holding a single image.
ComicSheet(int newPage, int newLeftImageIndex, int newRightImageIndex)
          Create a sheet holding a single image.
 
Method Summary
 int getLeftImageIndex()
           
 int getPage()
          Get the page to which the left image refers to.
 int getRightImageIndex()
           
 int getRightImageIndexOrNoImage()
           
 boolean hasRightImage()
          Does the sheet have a second image?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_IMAGE

public static final int NO_IMAGE
Value to indicat that no image is assigned.

See Also:
Constant Field Values
Constructor Detail

ComicSheet

public ComicSheet(int newPage,
                  int newLeftImageIndex)
Create a sheet holding a single image. Use setRightImageIndex() to add an image.

Parameters:
newPage - page number of the left ComicImage
newLeftImageIndex - index of the ComicImage that describes this page
See Also:
setRightImageIndex(int)

ComicSheet

public ComicSheet(int newPage,
                  int newLeftImageIndex,
                  int newRightImageIndex)
Create a sheet holding a single image. Use setRightImageIndex() to add an image.

Parameters:
newPage - page number of the left ComicImage
newLeftImageIndex - index of the ComicImage that describes this page
newRightImageIndex - Description of the parameter
Method Detail

getLeftImageIndex

public int getLeftImageIndex()

getPage

public int getPage()
Get the page to which the left image refers to.


getRightImageIndex

public int getRightImageIndex()

getRightImageIndexOrNoImage

public int getRightImageIndexOrNoImage()

hasRightImage

public boolean hasRightImage()
Does the sheet have a second image?


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object