ewe.fx.print
Class PageCounter

java.lang.Object
  extended byewe.fx.print.PageCounter

public class PageCounter
extends Object

You would only use this if you are inheriting from PrinterJobObject. It is used to iterate through pages that are to be printed.


Field Summary
 int currentPageIndex
          This is only valid after calls to moveToNextPage().
 int pagesInDocument
          This is the total number of pages in the document as reported by Printable.countPages()
 int pagesToPrint
          This is the total number of pages that will be printed using the provided PrinterOptions object.
 
Constructor Summary
PageCounter(Handle handle, Printable printable, PageFormat pageFormat, PrintOptions options)
           
 
Method Summary
 boolean moveToNextPage()
          Call this to move to the next page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

pagesInDocument

public int pagesInDocument
This is the total number of pages in the document as reported by Printable.countPages()


pagesToPrint

public int pagesToPrint
This is the total number of pages that will be printed using the provided PrinterOptions object.


currentPageIndex

public int currentPageIndex
This is only valid after calls to moveToNextPage(). This is sent to the print() method of the Printable.

Constructor Detail

PageCounter

public PageCounter(Handle handle,
                   Printable printable,
                   PageFormat pageFormat,
                   PrintOptions options)
Method Detail

moveToNextPage

public boolean moveToNextPage()
                       throws IllegalStateException
Call this to move to the next page. When it returns null it indicates that there are no more pages to print.

Throws:
IllegalStateException