public class PrintReportProcessor extends PageableReportProcessor implements Pageable
UNKNOWN_NUMBER_OF_PAGES
Constructor and Description |
---|
PrintReportProcessor(MasterReport report) |
Modifier and Type | Method and Description |
---|---|
void |
addReportProgressListener(ReportProgressListener l)
Adds a repagination listener.
|
void |
fireProcessingFinished() |
void |
fireProcessingStarted() |
Throwable |
getErrorReason()
Returns the last exception that has been caught.
|
int |
getNumberOfPages()
Returns the number of pages in the set.
|
PageDrawable |
getPageDrawable(int pageIndex)
Returns the
PageDrawable instance responsible for rendering the page specified by
pageIndex . |
PageFormat |
getPageFormat(int pageIndex)
Returns the
PageFormat of the page specified by pageIndex . |
Printable |
getPrintable(int pageIndex)
Returns the
Printable instance responsible for rendering the page specified by pageIndex . |
boolean |
isError()
Checks whether an error occurred.
|
boolean |
paginate()
Manually triggers the pagination.
|
void |
processReport()
This method throws an UnsupportedOperationException as printing is a passive process and cannot be started here.
|
void |
removeReportProgressListener(ReportProgressListener l)
Removes a repagination listener.
|
cancel, close, getConfiguration, getLogicalPageCount, getOutputProcessor, getPhysicalPageCount, isFullStreamingProcessor, isHandleInterruptedState, isPaginated, isQueryLimitReached, processPage, setFullStreamingProcessor, setHandleInterruptedState, setQueryLimitReached
public PrintReportProcessor(MasterReport report) throws ReportProcessingException
ReportProcessingException
public int getNumberOfPages()
Pageable
implementations return the true number of pages rather than the UNKNOWN_NUMBER_OF_PAGES
constant.getNumberOfPages
in interface Pageable
Pageable
.public boolean paginate()
paginate
in class AbstractReportProcessor
public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
PageFormat
of the page specified by pageIndex
.getPageFormat
in interface Pageable
pageIndex
- the zero based index of the page whose PageFormat
is being requestedPageFormat
describing the size and orientation.IndexOutOfBoundsException
- if the Pageable
does not contain the requested page.public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException
Printable
instance responsible for rendering the page specified by pageIndex
.getPrintable
in interface Pageable
pageIndex
- the zero based index of the page whose Printable
is being requestedPrintable
that renders the page.IndexOutOfBoundsException
- if the Pageable
does not contain the requested page.public PageDrawable getPageDrawable(int pageIndex)
PageDrawable
instance responsible for rendering the page specified by
pageIndex
.pageIndex
- the zero based index of the page whose Printable
is being requestedPageDrawable
that renders the page.IndexOutOfBoundsException
- if the Pageable
does not contain the requested page.public boolean isError()
public void processReport() throws ReportProcessingException
processReport
in interface ReportProcessor
processReport
in class AbstractReportProcessor
ReportProcessingException
public void fireProcessingStarted()
public void fireProcessingFinished()
public void addReportProgressListener(ReportProgressListener l)
addReportProgressListener
in interface ReportProcessor
addReportProgressListener
in class AbstractReportProcessor
l
- the listener.public void removeReportProgressListener(ReportProgressListener l)
removeReportProgressListener
in interface ReportProcessor
removeReportProgressListener
in class AbstractReportProcessor
l
- the listener.public Throwable getErrorReason()