Interface FillComponent
- All Known Implementing Classes:
BarbecueFillComponent,BarcodeFillComponent,BaseFillComponent,BaseFillList,FillSpiderChart,FillTable,HorizontalFillList,IconLabelComponentFill,SubreportFillComponent,VerticalFillList
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.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Method Summary
Modifier and TypeMethodDescriptionvoidevaluate(byte evaluation) Evaluates the fill component.voidevaluateDelayedElement(JRPrintElement element, byte evaluation) Perform delayed evaluations and fill the print element with the resulting data.fill()Fills the component by creating a print element which will be included in the generated report.voidinitialize(FillContext fillContext) Initializes the fill component with the fill context.prepare(int availableHeight) Deprecated.default FillPrepareResultprepare(int availableHeight, boolean isOverflowAllowed) Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.voidrewind()Rewinds the component.
-
Method Details
-
initialize
Initializes the fill component with the fill context.This method is called before the fill component is used.
- Parameters:
fillContext- the fill context
-
evaluate
Evaluates the fill component.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 onevaluateDelayedElement(JRPrintElement, byte).- Parameters:
evaluation- the evaluation type- Throws:
JRException- See Also:
-
prepare
Deprecated.Replaced byprepare(int, boolean). -
prepare
Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.- Parameters:
availableHeight- the amount of vertical space available for the component, starting from the top of the component element.isOverflowAllowed- flag indicating if overflow is allowed for the component.- Returns:
- the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
-
fill
JRPrintElement fill()Fills the component by creating a print element which will be included in the generated report.This method will get called only if
prepare(int)returned a result that indicated that the component will print.- Returns:
- the print element generated by the component
-
rewind
void rewind()Rewinds the component.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.
-
evaluateDelayedElement
Perform delayed evaluations and fill the print element with the resulting data.- Parameters:
element- the print element for which delayed evaluation has been registeredevaluation- the evaluation type- Throws:
JRException- See Also:
-
prepare(int, boolean).