Class MonitoredPrintable

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

    public class MonitoredPrintable
    extends java.lang.Object
    implements java.awt.print.Printable
    A wrapper for Printables that updates the currently displayed BusyDialog's progress bar to reflect the currently printing page index.
    Since:
    3.0
    Author:
    Chris Jennings
    • Field Summary

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

        NO_SUCH_PAGE, PAGE_EXISTS
    • Constructor Summary

      Constructors 
      Constructor Description
      MonitoredPrintable​(java.awt.print.Printable monitoredPrintable, int totalPageCount)
      Creates a new monitored printable that delegates printing to the specified Printable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int print​(java.awt.Graphics graphics, 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

      • MonitoredPrintable

        public MonitoredPrintable​(java.awt.print.Printable monitoredPrintable,
                                  int totalPageCount)
        Creates a new monitored printable that delegates printing to the specified Printable.
        Parameters:
        monitoredPrintable - the printable that will be called to print page content
        totalPageCount - the number of pages that will be printed
    • Method Detail

      • print

        public int print​(java.awt.Graphics graphics,
                         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