public class PrintReportProcessor extends PageableReportProcessor implements Pageable
COMMIT_RATE, MAX_EVENTS_PER_RUN, MIN_ROWS_PER_EVENT
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() |
protected void |
fireProcessingFinished(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
void |
fireProcessingStarted() |
protected void |
fireProcessingStarted(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
protected void |
fireStateUpdate(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
Throwable |
getErrorReason()
Returns the last exception that has been caught.
|
protected GraphicsOutputProcessor |
getGraphicsProcessor() |
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.
|
protected PageDrawable |
processPage(int page)
An internal method that returns the page-drawable for the given page.
|
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.
|
createLayoutManager
calculatePageCount, cancel, checkInterrupted, close, createProcessingContext, getConfiguration, getLogicalPageCount, getLogicalPageState, getOutputProcessor, getOutputProcessorMetaData, getPhysicalPageCount, getPhysicalPageState, getProcessStateHandle, getReport, isFullStreamingProcessor, isHandleInterruptedState, isPaginated, isQueryLimitReached, isStrictErrorHandling, prepareReportProcessing, processPage, processPrepareLevels, setFullStreamingProcessor, setHandleInterruptedState, setQueryLimitReached
public PrintReportProcessor(MasterReport report) throws ReportProcessingException
ReportProcessingException
protected GraphicsOutputProcessor getGraphicsProcessor()
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.protected PageDrawable processPage(int page) throws ReportProcessingException
page
- the page number.ReportProcessingException
- if a report processing error occurred.public boolean isError()
public void processReport() throws ReportProcessingException
processReport
in interface ReportProcessor
processReport
in class AbstractReportProcessor
ReportProcessingException
public void fireProcessingStarted()
public void fireProcessingFinished()
protected void fireStateUpdate(ReportProgressEvent state)
fireStateUpdate
in class AbstractReportProcessor
state
- the state.protected void fireProcessingStarted(ReportProgressEvent state)
fireProcessingStarted
in class AbstractReportProcessor
state
- the state.protected void fireProcessingFinished(ReportProgressEvent state)
fireProcessingFinished
in class AbstractReportProcessor
state
- the state.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()
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.