dwvisser.nuclear.swing
Class ComponentPrintable

java.lang.Object
  |
  +--dwvisser.nuclear.swing.ComponentPrintable
All Implemented Interfaces:
java.awt.print.Printable

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

Class copied from "Java 2D Graphics" by J. Knudsen, wraps AWT & Swing Componenents in order to render them on a printer.

Version:
Author:
dwvisser

Field Summary
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
ComponentPrintable(java.awt.Component c)
          Creates new ComponentPrintable
 
Method Summary
 int print(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentPrintable

public ComponentPrintable(java.awt.Component c)
Creates new ComponentPrintable

Method Detail

print

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