org.corpstein.image
Class ImageLayer

java.lang.Object
  extended by org.corpstein.image.Layer
      extended by org.corpstein.image.ImageLayer

public class ImageLayer
extends Layer

Version:
$Revision: 1.4 $ $Date: 2005/04/24 20:51:26 $
Author:
David Corpstein

Field Summary
 
Fields inherited from class org.corpstein.image.Layer
background, border, borderColor, DEFAULT_BORDER, DEFAULT_BORDER_COLOR, height, width, x, y, z
 
Constructor Summary
ImageLayer(java.awt.Image image)
           
ImageLayer(java.awt.Image image, int zIndex)
           
ImageLayer(java.lang.String filename)
          Constructs an ImageLayer using the filename param to read the image file.
ImageLayer(java.lang.String filename, int zIndex)
          Constructs an ImageLayer using the filename param to read the image file.
ImageLayer(java.net.URI uri)
          Constructs an ImageLayer, using the URI to read the image file.
ImageLayer(java.net.URI uri, int zIndex)
          Constructs an ImageLayer, using the URI to read the image file.
 
Method Summary
 void draw(java.awt.Graphics2D g)
           
 java.awt.Image getImage()
           
 void setHeight(int height)
           
 void setWidth(int width)
           
 
Methods inherited from class org.corpstein.image.Layer
getBackground, getBorder, getBorderColor, getHeight, getWidth, getX, getY, getZ, setBackground, setBorder, setBorderColor, setX, setY, setZ
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLayer

public ImageLayer(java.awt.Image image)

ImageLayer

public ImageLayer(java.awt.Image image,
                  int zIndex)

ImageLayer

public ImageLayer(java.lang.String filename)
Constructs an ImageLayer using the filename param to read the image file.

Parameters:
filename - The filename of the image
Throws:
java.lang.IllegalArgumentException - if the filename is null or the file does not exist, is not readable, or is not a file

ImageLayer

public ImageLayer(java.lang.String filename,
                  int zIndex)
Constructs an ImageLayer using the filename param to read the image file.

Parameters:
filename - The filename of the image
zIndex - The z-index of the layer in the larger image
Throws:
java.lang.IllegalArgumentException - if the filename is null or the file does not exist, is not readable, or is not a file

ImageLayer

public ImageLayer(java.net.URI uri)
Constructs an ImageLayer, using the URI to read the image file.

Parameters:
uri - The URI of an image file
Throws:
java.lang.IllegalArgumentException - if the URI is null or there is a problem with the URI syntax, or the URI does not exist, is not readable, or is not a file

ImageLayer

public ImageLayer(java.net.URI uri,
                  int zIndex)
Constructs an ImageLayer, using the URI to read the image file.

Parameters:
uri - The URI of an image file
zIndex - The z-index of the layer in the larger image
Throws:
java.lang.IllegalArgumentException - if the URI is null or there is a problem with the URI syntax, or the URI does not exist, is not readable, or is not a file
Method Detail

draw

public void draw(java.awt.Graphics2D g)
Overrides:
draw in class Layer

getImage

public java.awt.Image getImage()

setHeight

public void setHeight(int height)
Overrides:
setHeight in class Layer

setWidth

public void setWidth(int width)
Overrides:
setWidth in class Layer


Last update: 20050424 1651