ReportCat 1.1

li.netcat.print.util
Class ImagePrint

java.lang.Object
  extended byli.netcat.print.util.ImagePrint
All Implemented Interfaces:
Print

public class ImagePrint
extends java.lang.Object
implements Print

Implementation of the Print interface that is used to print high resolution images. Images are always printed on one single page.

Author:
Arthur Marxer

Constructor Summary
ImagePrint(java.awt.Image image)
          Constructs a new ImagePrint with the given image.
ImagePrint(java.awt.Image image, int width, int height)
          Constructs a new ImagePrint with the given image and the given size.
 
Method Summary
 java.awt.Image getImage()
          Returns the Image associated with the ImagePrint.
 int getImageHeight()
          Returns the height of the Image, either the specified or the original value.
 int getImageWidth()
          Returns the width of the Image, either the specified or the original value.
 java.awt.Dimension getPreferredSize(java.awt.Graphics g)
          Returns the preferred size of the Print.
 PrintIterator getPrintIterator()
          Factory method, that produces a PrintIerator.
 void setImage(java.awt.Image image)
          Sets the Image associated with the ImagePrint.
 void setImage(java.awt.Image image, int width, int height)
          Sets the Image associated with the ImagePrint.
 void setImageSize(int width, int height)
          Sets the size of the Image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePrint

public ImagePrint(java.awt.Image image)
Constructs a new ImagePrint with the given image.

Parameters:
image - The Image that will be painted.

ImagePrint

public ImagePrint(java.awt.Image image,
                  int width,
                  int height)
Constructs a new ImagePrint with the given image and the given size.

Parameters:
image - The Image that will be painted.
width - The width of the image. Specify -1 to use the original width of the image or a positive integer to overwrite that value.
height - The height of the image. Specify -1 to use the original height of the image or a positive integer to overwrite that value.
Method Detail

getImage

public java.awt.Image getImage()
Returns the Image associated with the ImagePrint.

Returns:
The Image associated with the ImagePrint. It can be null.

setImage

public void setImage(java.awt.Image image)
Sets the Image associated with the ImagePrint.

Parameters:
image - The Image associated with the ImagePrint. It can be null.

setImage

public void setImage(java.awt.Image image,
                     int width,
                     int height)
Sets the Image associated with the ImagePrint.

Parameters:
image - The Image associated with the ImagePrint. It can be null.
width - The width of the image. Specify -1 to use the original width of the image or a positive integer to overwrite that value.
height - The height of the image. Specify -1 to use the original height of the image or a positive integer to overwrite that value.

getImageWidth

public int getImageWidth()
Returns the width of the Image, either the specified or the original value.

Returns:
The width of the Image, either the specified or the original value.

getImageHeight

public int getImageHeight()
Returns the height of the Image, either the specified or the original value.

Returns:
The height of the Image, either the specified or the original value.

setImageSize

public void setImageSize(int width,
                         int height)
Sets the size of the Image.

Parameters:
width - The width of the image. Specify -1 to use the original width of the image or a positive integer to overwrite that value.
height - The height of the image. Specify -1 to use the original height of the image or a positive integer to overwrite that value.

getPreferredSize

public java.awt.Dimension getPreferredSize(java.awt.Graphics g)
Description copied from interface: Print
Returns the preferred size of the Print.

Specified by:
getPreferredSize in interface Print
Parameters:
g - The relevant Graphics object. It can be used to calculate the widths of strings.
Returns:
The preferred size of the Print.

getPrintIterator

public PrintIterator getPrintIterator()
Description copied from interface: Print
Factory method, that produces a PrintIerator. The PrintIterator is used like an enumeration to generate all Prints.

Specified by:
getPrintIterator in interface Print
Returns:
An instance of a PrintIterator that is able to iterate over the Print.

ReportCat 1.1

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation