public interface FillComponent
The fill component implementation is responsible for managing a component at fill time. A typical implementation would evaluate a set of expressions and create a print element to be included in the generated report.
Modifier and Type | Method and Description |
---|---|
void |
evaluate(byte evaluation)
Evaluates the fill component.
|
void |
evaluateDelayedElement(JRPrintElement element,
byte evaluation)
Perform delayed evaluations and fill the print element with the
resulting data.
|
JRPrintElement |
fill()
Fills the component by creating a print element which will be included
in the generated report.
|
void |
initialize(FillContext fillContext)
Initializes the fill component with the fill context.
|
FillPrepareResult |
prepare(int availableHeight)
Prepares to fill the component by deciding whether the component will
print, and how much vertical space it will require.
|
void |
rewind()
Rewinds the component.
|
void initialize(FillContext fillContext)
This method is called before the fill component is used.
fillContext
- the fill contextvoid evaluate(byte evaluation) throws JRException
This method would evaluate the component expressions and store the
results to be used in fill()
.
If the component needs to delay the evaluation of some of its
expressions, it would call
FillContext.registerDelayedEvaluation(JRPrintElement, EvaluationTimeEnum, String)
to register a delayed evaluation print element, and perform the delayed
evaluations on evaluateDelayedElement(JRPrintElement, byte)
.
evaluation
- the evaluation typeJRException
FillContext.evaluate(net.sf.jasperreports.engine.JRExpression, byte)
FillPrepareResult prepare(int availableHeight)
availableHeight
- the amount of vertical space available for the
component, starting from the top of the component element.JRPrintElement fill()
This method will get called only if prepare(int)
returned
a result that indicated that the component will print.
void rewind()
This method is called when filling the component has been canceled and is about to be restarted. The component needs to reset its state (if any) to initial values.
void evaluateDelayedElement(JRPrintElement element, byte evaluation) throws JRException
element
- the print element for which delayed evaluation has
been registeredevaluation
- the evaluation typeJRException
evaluate(byte)
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.