com.saic.isd.printscreen
Class PrintableText

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

public class PrintableText
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
PrintableText(javax.swing.text.JTextComponent text)
           
 
Method Summary
 int print(java.awt.Graphics g, java.awt.print.PageFormat pform, int pageNumber)
           
 void printContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintableText

public PrintableText(javax.swing.text.JTextComponent text)
Method Detail

printContent

public void printContent()

print

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


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