Package net.sf.jasperreports.barcode4j
Class BarcodeFillComponent
java.lang.Object
net.sf.jasperreports.engine.component.BaseFillComponent
net.sf.jasperreports.barcode4j.BarcodeFillComponent
- All Implemented Interfaces:
FillComponent
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
fillContext, printElementOriginator -
Constructor Summary
ConstructorsConstructorDescriptionBarcodeFillComponent(BarcodeComponent barcodeComponent) BarcodeFillComponent(BarcodeFillComponent barcode) -
Method Summary
Modifier and TypeMethodDescriptionvoidevaluate(byte evaluation) Evaluates the fill component.protected voidevaluateBarcode(byte evaluation) voidevaluateDelayedElement(JRPrintElement element, byte evaluation) The default implementation throwsUnsupportedOperationException.fill()Fills the component by creating a print element which will be included in the generated report.protected JRTemplateImageprotected booleanprepare(int availableHeight) prepare(int availableHeight, boolean isOverflowAllowed) Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.protected voidMethods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
deduplicate, evaluateExpression, initialize, rewind
-
Constructor Details
-
BarcodeFillComponent
-
BarcodeFillComponent
-
-
Method Details
-
evaluate
Description copied from interface:FillComponentEvaluates the fill component.This method would evaluate the component expressions and store the results to be used in
FillComponent.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 onFillComponent.evaluateDelayedElement(JRPrintElement, byte).- Parameters:
evaluation- the evaluation type- Throws:
JRException- See Also:
-
isEvaluateNow
protected boolean isEvaluateNow() -
evaluateBarcode
protected void evaluateBarcode(byte evaluation) -
prepare
-
prepare
Description copied from interface:FillComponentPrepares 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
Description copied from interface:FillComponentFills the component by creating a print element which will be included in the generated report.This method will get called only if
FillComponent.prepare(int)returned a result that indicated that the component will print.- Returns:
- the print element generated by the component
-
getTemplateImage
-
setBarcodeImage
-
evaluateDelayedElement
Description copied from class:BaseFillComponentThe default implementation throwsUnsupportedOperationException.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElementin interfaceFillComponent- Overrides:
evaluateDelayedElementin classBaseFillComponent- Parameters:
element- the print element for which delayed evaluation has been registeredevaluation- the evaluation type- Throws:
JRException- See Also:
-