Class ComponentPrinter

  • All Implemented Interfaces:
    java.awt.print.Printable

    public class ComponentPrinter
    extends java.lang.Object
    implements java.awt.print.Printable
    Helper class to print AWT/Swing components. Limited to component classes which are rendered solely by the AWT event thread.
    Author:
    K.Jaensch, klausj@phonetik.uni-muenchen.de
    • Field Summary

      • Fields inherited from interface java.awt.print.Printable

        NO_SUCH_PAGE, PAGE_EXISTS
    • Constructor Summary

      Constructors 
      Constructor Description
      ComponentPrinter​(java.awt.Component component)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

      • ComponentPrinter

        public ComponentPrinter​(java.awt.Component component)
    • 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
        Throws:
        java.awt.print.PrinterException