jimm.datavision.layout.swing
Class SwingPrintBook

java.lang.Object
  extended by jimm.datavision.layout.swing.SwingPrintBook
All Implemented Interfaces:
java.awt.print.Pageable

 class SwingPrintBook
extends java.lang.Object
implements java.awt.print.Pageable

Returns printable pages to a print job.


Field Summary
protected  java.util.List pageContents
           
protected  java.awt.print.PageFormat pageFormat
           
protected  StatusDialog statusDialog
           
protected  boolean wasBuiltForUs
           
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
SwingPrintBook(java.util.List pages, java.awt.print.PageFormat format)
           
 
Method Summary
 int getNumberOfPages()
           
 java.awt.print.PageFormat getPageFormat(int pageIndex)
           
 java.awt.print.Printable getPrintable(int pageIndex)
          Returns the specified swing page.
(package private)  void setStatusDialog(StatusDialog statusDialog)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statusDialog

protected StatusDialog statusDialog

pageContents

protected java.util.List pageContents

pageFormat

protected java.awt.print.PageFormat pageFormat

wasBuiltForUs

protected boolean wasBuiltForUs
Constructor Detail

SwingPrintBook

SwingPrintBook(java.util.List pages,
               java.awt.print.PageFormat format)
Method Detail

setStatusDialog

void setStatusDialog(StatusDialog statusDialog)

getNumberOfPages

public int getNumberOfPages()
Specified by:
getNumberOfPages in interface java.awt.print.Pageable

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
Specified by:
getPageFormat in interface java.awt.print.Pageable

getPrintable

public java.awt.print.Printable getPrintable(int pageIndex)
Returns the specified swing page. If the page has already been constructed for display, we return that page. If it has not, we create and return a new, temporary page.

Specified by:
getPrintable in interface java.awt.print.Pageable