Class SubreportFillComponent
- java.lang.Object
-
- net.sf.jasperreports.engine.component.BaseFillComponent
-
- net.sf.jasperreports.components.subreport.fill.SubreportFillComponent
-
- All Implemented Interfaces:
FillComponent
- Direct Known Subclasses:
FillTable
public abstract class SubreportFillComponent extends BaseFillComponent
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SubreportFillComponent.ComponentFillSubreportFactory
-
Field Summary
Fields Modifier and Type Field Description protected JRFillObjectFactory
factory
protected ComponentFillSubreport
fillSubreport
protected int
fillWidth
-
Fields inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
fillContext, printElementOriginator
-
-
Constructor Summary
Constructors Constructor Description SubreportFillComponent(SubreportFillComponent subreportComponent, JRFillCloneFactory factory)
SubreportFillComponent(Component subreportComponent, JRFillObjectFactory factory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
createFillSubreport()
protected SubreportFillComponent.ComponentFillSubreportFactory
createFillTableSubreportFactory()
void
evaluate(byte evaluation)
Evaluates the fill component.JRPrintElement
fill()
Fills the component by creating a print element which will be included in the generated report.protected JRDatasetRun
getDatasetRun()
abstract SubreportFillComponent.ComponentFillSubreportFactory
getFillSubreportFactory()
protected JRTemplateFrame
getFrameTemplate()
abstract JasperReport
getJasperReport(BuiltinExpressionEvaluatorFactory builtinEvaluatorFactory)
abstract boolean
isEmpty()
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()
The default implementation is empty.abstract void
setFillSubreportFactory(SubreportFillComponent.ComponentFillSubreportFactory subreportFactory)
-
Methods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
deduplicate, evaluateDelayedElement, evaluateExpression, initialize
-
-
-
-
Field Detail
-
factory
protected final JRFillObjectFactory factory
-
fillSubreport
protected ComponentFillSubreport fillSubreport
-
fillWidth
protected int fillWidth
-
-
Constructor Detail
-
SubreportFillComponent
public SubreportFillComponent(Component subreportComponent, JRFillObjectFactory factory)
-
SubreportFillComponent
public SubreportFillComponent(SubreportFillComponent subreportComponent, JRFillCloneFactory factory)
-
-
Method Detail
-
getDatasetRun
protected JRDatasetRun getDatasetRun()
-
evaluate
public void evaluate(byte evaluation) throws JRException
Description copied from interface:FillComponent
Evaluates 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:
FillContext.evaluate(net.sf.jasperreports.engine.JRExpression, byte)
-
createFillSubreport
protected void createFillSubreport() throws JRException
- Throws:
JRException
-
getFillSubreportFactory
public abstract SubreportFillComponent.ComponentFillSubreportFactory getFillSubreportFactory()
-
setFillSubreportFactory
public abstract void setFillSubreportFactory(SubreportFillComponent.ComponentFillSubreportFactory subreportFactory)
-
getJasperReport
public abstract JasperReport getJasperReport(BuiltinExpressionEvaluatorFactory builtinEvaluatorFactory) throws JRException
- Throws:
JRException
-
isEmpty
public abstract boolean isEmpty()
-
createFillTableSubreportFactory
protected SubreportFillComponent.ComponentFillSubreportFactory createFillTableSubreportFactory() throws JRException
- Throws:
JRException
-
prepare
public FillPrepareResult prepare(int availableHeight)
Description copied from interface:FillComponent
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.- Returns:
- the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
-
fill
public JRPrintElement fill()
Description copied from interface:FillComponent
Fills 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
-
getFrameTemplate
protected JRTemplateFrame getFrameTemplate()
-
rewind
public void rewind()
Description copied from class:BaseFillComponent
The default implementation is empty.Override this method if something needs to be done on component rewind.
- Specified by:
rewind
in interfaceFillComponent
- Overrides:
rewind
in classBaseFillComponent
-
-