com.saic.isd.printscreen
Class PrintableImage

java.lang.Object
  extended bycom.saic.isd.printscreen.PrintableImage
All Implemented Interfaces:
java.awt.print.Printable

public class PrintableImage
extends java.lang.Object
implements java.awt.print.Printable

Prints text in a JTextComponent.

Idea for and initial code for this class thanks to:
http://www.jalice.net/exkit.htm


Field Summary
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PrintableImage(java.awt.Component cmp)
           
 
Method Summary
 int print(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageNumber)
           
 void printContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintableImage

public PrintableImage(java.awt.Component cmp)
Method Detail

printContent

public void printContent()

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pageFormat,
                 int pageNumber)
Specified by:
print in interface java.awt.print.Printable


Copyright © 2002 Gerhard Beck. All rights reserved. Subject to GPL.