jdbreport.grid
Class ReportPrintable

java.lang.Object
  extended by jdbreport.grid.ReportPrintable
All Implemented Interfaces:
Printable

public class ReportPrintable
extends Object
implements Printable

Version:
2.0 12.05.2011
Author:
Andrey Kholmanskih

Nested Class Summary
static class ReportPrintable.PageClip
           
 
Field Summary
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
ReportPrintable(JReportGrid table, JTable.PrintMode printMode)
           
ReportPrintable(JReportGrid table, JTable.PrintMode printMode, boolean isPreview)
          Creates a new TablePrintable for the given JTable.
ReportPrintable(ReportModel model)
           
 
Method Summary
 int calcCountPage(PageFormat pageFormat)
           
 Map<Integer,ReportPrintable.PageClip> getPageClips()
           
 int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportPrintable

public ReportPrintable(JReportGrid table,
                       JTable.PrintMode printMode)

ReportPrintable

public ReportPrintable(JReportGrid table,
                       JTable.PrintMode printMode,
                       boolean isPreview)
Creates a new TablePrintable for the given JTable. Header and footer text can be specified using the two MessageFormat parameters. When called upon to provide a String, each format is given the current page number.

Parameters:
table - the table to print
printMode - the printing mode for this printable
isPreview - - if true, report will be preview
Throws:
IllegalArgumentException - if passed an invalid print mode

ReportPrintable

public ReportPrintable(ReportModel model)
Method Detail

print

public int print(Graphics graphics,
                 PageFormat pageFormat,
                 int pageIndex)
          throws PrinterException
Specified by:
print in interface Printable
Throws:
PrinterException

calcCountPage

public int calcCountPage(PageFormat pageFormat)

getPageClips

public Map<Integer,ReportPrintable.PageClip> getPageClips()