|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.targets.pageable.PageableReportProcessor
A report processor for Pageable OutputTargets. The processor coordinates and initializes the output process for all page- and print-oriented output formats.
Field Summary | |
static java.lang.String |
LAYOUTMANAGER_NAME
The page layout manager name. |
Constructor Summary | |
PageableReportProcessor(JFreeReport report)
Creates a new ReportProcessor. |
Method Summary | |
void |
addRepaginationListener(RepaginationListener l)
Adds a listener. |
protected void |
fireStateUpdate(RepaginationState state)
Sends a repagination update to all registered listeners. |
OutputTarget |
getOutputTarget()
Returns the output target. |
JFreeReport |
getReport()
Returns the report. |
protected boolean |
isEmptyPageGenerated(ReportState state)
Checks the state of the logical page, to see whether some content has been printed on the page. |
boolean |
isHandleInterruptedState()
Returns whether the processor should check the threads interrupted state. |
ReportState |
processPage(ReportState currPage,
OutputTarget out)
Draws a single page of the report to the specified graphics device, and returns state information. |
ReportState |
processPage(ReportState currPage,
OutputTarget out,
boolean failOnError)
Draws a single page of the report to the specified graphics device, and returns state information. |
void |
processReport()
Processes the report in two passes, the first pass calculates page boundaries and function values, the second pass sends each page to the output target. |
void |
removeRepaginationListener(RepaginationListener l)
Removes a listener. |
ReportStateList |
repaginate()
Processes the entire report and records the state at the end of every page. |
void |
setHandleInterruptedState(boolean handleInterruptedState)
Defines, whether the processor should check the threads interrupted state. |
void |
setOutputTarget(OutputTarget outputTarget)
Sets the output target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LAYOUTMANAGER_NAME
Constructor Detail |
public PageableReportProcessor(JFreeReport report) throws ReportProcessingException, FunctionInitializeException
report
- the report.
ReportProcessingException
- if the report cannot be cloned.
FunctionInitializeException
- if a function cannot be initialised.Method Detail |
public void addRepaginationListener(RepaginationListener l)
l
- the listener.public void removeRepaginationListener(RepaginationListener l)
l
- the listener.protected void fireStateUpdate(RepaginationState state)
state
- the state.public boolean isHandleInterruptedState()
public void setHandleInterruptedState(boolean handleInterruptedState)
handleInterruptedState
- true, if the processor should check the current thread state,
false otherwise.public OutputTarget getOutputTarget()
public void setOutputTarget(OutputTarget outputTarget)
outputTarget
- the output target.public JFreeReport getReport()
public void processReport() throws ReportProcessingException, EmptyReportException
It is possible for the report processing to fail. A base cause is that the report is designed for a certain page size, but ends up being sent to an output target with a much smaller page size. If the headers and footers don't leave enough room on the page for at least one row of data to be printed, then no progress is made. An exception will be thrown if this happens.
ReportProcessingException
- if the report did not proceed and got stuck.
EmptyReportException
- if the repagination returned no pages.public ReportStateList repaginate() throws ReportProcessingException
ReportProcessingException
- if there was a problem processing the report.public ReportState processPage(ReportState currPage, OutputTarget out) throws ReportProcessingException
To check the progress, use ReportState.isProceeding(oldstate).
out
- The output target.currPage
- The report state at the beginning of the current page.
java.lang.IllegalArgumentException
- if the given state is a start or a finish state.
ReportProcessingException
- if there is a problem processing the report or the
current thread has been interrupted.public ReportState processPage(ReportState currPage, OutputTarget out, boolean failOnError) throws ReportProcessingException
To check the progress, use ReportState.isProceeding(oldstate).
out
- The output target.currPage
- The report state at the beginning of the current page.failOnError
- if set to true, then errors in the report event handling will cause the
reporting to fail.
java.lang.IllegalArgumentException
- if the given state is a start or a finish state.
ReportProcessingException
- if there is a problem processing the report or the
current thread has been interrupted.protected boolean isEmptyPageGenerated(ReportState state)
state
- the state which should be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |