edu.udo.cs.yale.gui
Class ComponentPrinter
java.lang.Object
edu.udo.cs.yale.gui.ComponentPrinter
- All Implemented Interfaces:
- java.awt.print.Printable
public class ComponentPrinter
- extends java.lang.Object
- implements java.awt.print.Printable
A Printable that can print an arbitrary component. It scales and translates
the pages such that the complete component is visible.
- Version:
- $Id: ComponentPrinter.java,v 2.10 2006/08/03 14:39:27 ingomierswa Exp $
- Author:
- Simon Fischer, Ingo Mierswa
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary |
ComponentPrinter(java.awt.Component component)
The given component should be printed. |
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 |
component
private java.awt.Component component
TITLE_FONT
private static final java.awt.Font TITLE_FONT
ComponentPrinter
public ComponentPrinter(java.awt.Component component)
- The given component should be printed.
print
public int print(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex)
- Specified by:
print
in interface java.awt.print.Printable
Copyright © 2001-2006