jxl.write
Class WritableImage

java.lang.Object
  extended byjxl.biff.drawing.Drawing
      extended byjxl.write.WritableImage

public class WritableImage
extends jxl.biff.drawing.Drawing

Allows an image to be created, or an existing image to be manipulated Note that co-ordinates and dimensions are given in cells, so that if for example the width or height of a cell which the image spans is altered, the image will have a correspondign distortion


Field Summary
 
Fields inherited from class jxl.biff.drawing.Drawing
READ, READ_WRITE, WRITE
 
Constructor Summary
WritableImage(double x, double y, double width, double height, byte[] imageData)
          Constructor
WritableImage(double x, double y, double width, double height, java.io.File image)
          Constructor
WritableImage(jxl.biff.drawing.Drawing d)
          Constructor, used when copying sheets
 
Method Summary
 double getColumn()
          Accessor for the image position
 double getHeight()
          Accessor for the image dimensions
 byte[] getImageData()
          Accessor for the image data
 java.io.File getImageFile()
          Accessor for the image file
 double getRow()
          Accessor for the image position
 double getWidth()
          Accessor for the image dimensions
 void setColumn(double c)
          Accessor for the image position
 void setHeight(double c)
          Accessor for the image dimensions Note that the actual size of the rendered image will depend on the height of the rows it spans
 void setRow(double c)
          Accessor for the image position
 void setWidth(double c)
          Accessor for the image dimensions Note that the actual size of the rendered image will depend on the width of the columns it spans
 
Methods inherited from class jxl.biff.drawing.Drawing
getSpContainer, getX, getY, setX, setY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritableImage

public WritableImage(double x,
                     double y,
                     double width,
                     double height,
                     byte[] imageData)
Constructor

Parameters:
x - the column number at which to position the image
y - the row number at which to position the image
width - the number of columns cells which the image spans
height - the number of rows which the image spans

WritableImage

public WritableImage(double x,
                     double y,
                     double width,
                     double height,
                     java.io.File image)
Constructor

Parameters:
x - the column number at which to position the image
y - the row number at which to position the image
width - the number of columns cells which the image spans
height - the number of rows which the image spans
image - the source image file

WritableImage

public WritableImage(jxl.biff.drawing.Drawing d)
Constructor, used when copying sheets

Parameters:
d - the image to copy
Method Detail

getColumn

public double getColumn()
Accessor for the image position

Returns:
the column number at which the image is positioned

getHeight

public double getHeight()
Accessor for the image dimensions

Returns:
the number of rows which this image spans

getImageData

public byte[] getImageData()
Accessor for the image data

Returns:
the image data

getImageFile

public java.io.File getImageFile()
Accessor for the image file

Returns:
the file which the image references

getRow

public double getRow()
Accessor for the image position

Returns:
the row number at which the image is positions

getWidth

public double getWidth()
Accessor for the image dimensions

Returns:
the number of columns this image spans

setColumn

public void setColumn(double c)
Accessor for the image position

Parameters:
c - the column number at which the image should be positioned

setHeight

public void setHeight(double c)
Accessor for the image dimensions Note that the actual size of the rendered image will depend on the height of the rows it spans

Parameters:
c - the number of rows which this image should span

setRow

public void setRow(double c)
Accessor for the image position

Parameters:
c - the row number at which the image should be positioned

setWidth

public void setWidth(double c)
Accessor for the image dimensions Note that the actual size of the rendered image will depend on the width of the columns it spans

Parameters:
c - the number of columns which this image spans