Package net.sf.jasperreports.engine.fill
Class JRBaseFiller
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.BaseReportFiller
-
- net.sf.jasperreports.engine.fill.JRBaseFiller
-
- All Implemented Interfaces:
ReportFiller,JRDefaultStyleProvider
- Direct Known Subclasses:
JRHorizontalFiller,JRVerticalFiller
public abstract class JRBaseFiller extends BaseReportFiller implements JRDefaultStyleProvider
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceJRBaseFiller.DefaultStyleListener
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.fill.BaseReportFiller
bookmarkHelper, calculator, datasetMap, delayedActions, factory, fillContext, fillerId, fillingThread, fillListener, formatFactory, ignorePagination, jasperPrint, jasperReport, jasperReportsContext, mainDataset, parent, printTransferPropertyPrefixes, propertiesUtil, reportSource, repositoryContext, scriptlet, usedPageWidth, virtualizationContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRBaseFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, BandReportFillerParent parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime)protected voidaddBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, String groupName, JRFillBand band)protected voidaddBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, JRGroup group, JRFillBand band)protected voidaddDefaultStyleListener(JRBaseFiller.DefaultStyleListener listener)protected voidaddPage(JRPrintPage page)protected voidaddPageToParent(boolean ended)voidaddPrintStyle(JRStyle style)protected PrintElementOriginatorassignElementId(JRFillElement fillElement)protected voidcollectIncludedTemplates(ReportTemplateSource templateSource, List<JRStyle> externalStyles, Set<String> loadedLocations, Set<String> templateParentLocations)protected List<JRStyle>collectStyles()protected voidcollectStyles(ReportTemplateSource template, List<JRStyle> externalStyles, Set<String> loadedLocations)protected voidcollectStyles(ReportTemplateSource templateSource, List<JRStyle> externalStyles, Set<String> loadedLocations, Set<String> templateParentLocations)protected voidcollectTemplates()protected List<JRStyle>collectTemplateStyles()protected voidcreateReportTemplates(JRFillObjectFactory factory)protected intcurrentPageIndex()JasperPrintfill(Map<String,Object> parameterValues)protected voidfillBand(JRPrintBand band)protected abstract voidfillReport()protected BandReportFillerParentgetBandReportParent()JRPrintPagegetCurrentPage()protected intgetCurrentPageContentsWidth()intgetCurrentPageCount()Returns the number of generated master print pages.FormatgetDateFormat(String pattern)protected FormatgetDateFormat(String pattern, TimeZone timeZone)JRStylegetDefaultStyle()Returns a default style.protected JRFillFieldgetField(String fieldName)Returns a report field.protected Map<String,JRFillField>getFieldsMap()Returns the report fields indexed by name.protected intgetFillerId()protected JRFillGroupgetGroup(String groupName)protected JRFillGroupgetKeepTogetherGroup()protected intgetMasterColumnCount()BaseReportFillergetMasterFiller()Returns the top-level (master) filler object.protected intgetMaxPageHeight(Map<String,Object> parameterValues)protected intgetMaxPageWidth(Map<String,Object> parameterValues)FormatgetNumberFormat(String pattern)protected List<String>getPrintTransferPropertyPrefixes()protected ResourceBundlegetResourceBundle()Returns the report resource bundle.JRStyledTextParsergetStyledTextParser()protected JRStyledTextUtilgetStyledTextUtil()StyleResolvergetStyleResolver()Returns a style resolver.List<JRTemplate>getTemplates()protected Map<String,JRFillVariable>getVariablesMap()Returns the report variables indexed by name.protected WhenNoDataTypeEnumgetWhenNoDataType()protected WhenResourceMissingTypeEnumgetWhenResourceMissingType()protected booleanhasBoundActions(JRPrintPage page)protected booleanhasMasterFormatFactory()protected booleanhasMasterLocale()protected booleanhasMasterTimeZone()protected voidignorePaginationSet(Map<String,Object> parameterValues)protected JRFillObjectFactoryinitFillFactory()protected booleanisBandOverFlowAllowed()protected booleanisLegacyTextMeasuring()Deprecated.To be removed.booleanisPageFinal(int pageIdx)booleanisPageFinal(JRPrintPage page)protected booleanisReorderBandElements()protected booleanisSubreportRunToBottom()protected voidjasperReportSet()protected voidloadStyles()protected voidlookupExternalDefaultStyle(Collection<JRStyle> styleList)protected voidmoveBoundActions(FillPageKey subreportKey, FillPageKey parentKey)protected JRPrintPagenewPage()protected booleannext()protected voidrecordUsedPageHeight(int pageHeight)protected voidrecordUsedWidth(JRPrintElement element)voidregisterReportStyles(UUID id, List<JRStyle> styles)protected voidregisterSubfiller(JRBaseFiller subfiller)protected voidresolveBandBoundElements(JRFillBand band, byte evaluation)Resloves elements which are to be evaluated at band level.protected voidresolveColumnBoundElements(byte evaluation)Resolves elements which are to be evaluated at column level.protected voidresolveGroupBoundElements(byte evaluation, boolean isFinal)Resolves elements which are to be evaluated at group level.protected voidresolvePageBoundElements(byte evaluation)Resolves elements which are to be evaluated at page level.protected voidresolveReportBoundElements()Resolves elements which are to be evaluated at report level.protected voidsetBandOverFlowAllowed(boolean splittableBand)protected voidsetDefaultStyle(JRStyle style)protected voidsetJasperReportsContext(JasperReportsContext jasperReportsContext)protected voidsetMasterPageVariables(int currentPageIndex, int totalPages)protected abstract voidsetPageHeight(int pageHeight)protected voidsetParameter(String parameterName, Object value)Sets a parameter's value.protected voidsetParameter(JRFillParameter parameter, Object value)Sets a parameter's value.protected voidsetReorderBandElements(boolean isReorderBandElements)protected voidsubreportPageFilled(JRPrintPage subreportPage)protected voidunregisterSubfiller(JRBaseFiller subfiller)-
Methods inherited from class net.sf.jasperreports.engine.fill.BaseReportFiller
addBoundElement, addFillListener, addLastPageBookmarks, addVariableCalculationReq, cancelFill, checkInterrupted, clearFillingThread, createBoundElementMaps, detectPart, evaluateExpression, fill, fill, getExpressionEvaluator, getFillContext, getFormatFactory, getJasperPrint, getJasperReport, getJasperReportsContext, getLocale, getMainDataset, getOwnIgnorePagination, getParametersMap, getParameterValue, getParameterValuesMap, getPropertiesUtil, getReportSource, getRepositoryContext, getTimeZone, getUsedPageWidth, getVariable, getVariableValue, getVirtualizationContext, initDatasets, initVirtualizationContext, isDeliberatelyInterrupted, isIgnorePagination, isInterrupted, isMasterReport, isSubreport, recordUsedPageWidth, resolveBoundElements, resolveMasterBoundElements, setBookmarkHelper, setConnectionParameterValue, setDatasourceParameterValue, setFormatFactory, setIgnorePagination, setInterrupted, setParameters, setParametersToContext, setVirtualPageSize, updateBookmark
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_INFINITE_LOOP_CREATING_NEW_PAGE
public static final String EXCEPTION_MESSAGE_KEY_INFINITE_LOOP_CREATING_NEW_PAGE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_COLUMN_HEADER_OVERFLOW_INFINITE_LOOP
public static final String EXCEPTION_MESSAGE_KEY_COLUMN_HEADER_OVERFLOW_INFINITE_LOOP
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_CIRCULAR_DEPENDENCY_FOUND
public static final String EXCEPTION_MESSAGE_KEY_CIRCULAR_DEPENDENCY_FOUND
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_EXTERNAL_STYLE_NAME_NOT_SET
public static final String EXCEPTION_MESSAGE_KEY_EXTERNAL_STYLE_NAME_NOT_SET
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_GROUP
public static final String EXCEPTION_MESSAGE_KEY_NO_SUCH_GROUP
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_PAGE_HEADER_OVERFLOW_INFINITE_LOOP
public static final String EXCEPTION_MESSAGE_KEY_PAGE_HEADER_OVERFLOW_INFINITE_LOOP
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_SECTION_TYPE
public static final String EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_SECTION_TYPE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_KEEP_TOGETHER_CONTENT_DOES_NOT_FIT
public static final String EXCEPTION_MESSAGE_KEY_KEEP_TOGETHER_CONTENT_DOES_NOT_FIT
- See Also:
- Constant Field Values
-
name
protected String name
-
columnCount
protected int columnCount
-
printOrder
protected PrintOrderEnum printOrder
-
columnDirection
protected RunDirectionEnum columnDirection
-
pageWidth
protected int pageWidth
-
maxPageWidth
protected int maxPageWidth
-
pageHeight
protected int pageHeight
-
orientation
protected OrientationEnum orientation
-
columnWidth
protected int columnWidth
-
columnSpacing
protected int columnSpacing
-
leftMargin
protected int leftMargin
-
rightMargin
protected int rightMargin
-
topMargin
protected int topMargin
-
bottomMargin
protected int bottomMargin
-
isTitleNewPage
protected boolean isTitleNewPage
-
isSummaryNewPage
protected boolean isSummaryNewPage
-
isSummaryWithPageHeaderAndFooter
protected boolean isSummaryWithPageHeaderAndFooter
-
isFloatColumnFooter
protected boolean isFloatColumnFooter
-
whenResourceMissingType
protected WhenResourceMissingTypeEnum whenResourceMissingType
the resource missing handling type
-
reportTemplates
protected JRFillReportTemplate[] reportTemplates
-
templates
protected List<ReportTemplateSource> templates
-
defaultStyle
protected JRStyle defaultStyle
-
styleResolver
protected StyleResolver styleResolver
-
styles
protected JRStyle[] styles
-
groups
protected JRFillGroup[] groups
-
missingFillSection
protected JRFillSection missingFillSection
-
missingFillBand
protected JRFillBand missingFillBand
-
background
protected JRFillBand background
-
title
protected JRFillBand title
-
pageHeader
protected JRFillBand pageHeader
-
columnHeader
protected JRFillBand columnHeader
-
detailSection
protected JRFillSection detailSection
-
columnFooter
protected JRFillBand columnFooter
-
pageFooter
protected JRFillBand pageFooter
-
lastPageFooter
protected JRFillBand lastPageFooter
-
summary
protected JRFillBand summary
-
noData
protected JRFillBand noData
-
printPage
protected JRPrintPage printPage
-
printPageContentsWidth
protected int printPageContentsWidth
-
bands
protected List<JRBand> bands
List ofJRFillBandobjects containing all bands of the report.
-
subfillers
protected Map<Integer,JRBaseFiller> subfillers
Collection of subfillers
-
groupFooterPositionElementRange
protected GroupFooterElementRange groupFooterPositionElementRange
-
detailElementRange
protected ElementRange detailElementRange
-
orphanGroupFooterDetailElementRange
protected ElementRange orphanGroupFooterDetailElementRange
-
orphanGroupFooterElementRange
protected ElementRange orphanGroupFooterElementRange
-
floatColumnFooterElementRange
protected ElementRange floatColumnFooterElementRange
-
isCreatingNewPage
protected boolean isCreatingNewPage
-
isNewPage
protected boolean isNewPage
-
isNewColumn
protected boolean isNewColumn
-
isFirstPageBand
protected boolean isFirstPageBand
-
isFirstColumnBand
protected boolean isFirstColumnBand
-
isCrtRecordOnPage
protected boolean isCrtRecordOnPage
-
isCrtRecordOnColumn
protected boolean isCrtRecordOnColumn
-
preventOrphanFootersMinLevel
protected Integer preventOrphanFootersMinLevel
-
crtGroupFootersLevel
protected int crtGroupFootersLevel
-
columnIndex
protected int columnIndex
-
offsetX
protected int offsetX
-
offsetY
protected int offsetY
-
columnHeaderOffsetY
protected int columnHeaderOffsetY
-
columnFooterOffsetY
protected int columnFooterOffsetY
-
lastPageColumnFooterOffsetY
protected int lastPageColumnFooterOffsetY
-
isLastPageFooter
protected boolean isLastPageFooter
-
isReorderBandElements
protected boolean isReorderBandElements
-
usedPageHeight
protected int usedPageHeight
-
-
Constructor Detail
-
JRBaseFiller
protected JRBaseFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, BandReportFillerParent parent) throws JRException
- Throws:
JRException
-
-
Method Detail
-
jasperReportSet
protected void jasperReportSet()
- Specified by:
jasperReportSetin classBaseReportFiller
-
initFillFactory
protected JRFillObjectFactory initFillFactory()
- Specified by:
initFillFactoryin classBaseReportFiller
-
setJasperReportsContext
protected void setJasperReportsContext(JasperReportsContext jasperReportsContext)
- Overrides:
setJasperReportsContextin classBaseReportFiller
-
getFieldsMap
protected Map<String,JRFillField> getFieldsMap()
Returns the report fields indexed by name.- Returns:
- the report fields map
-
getVariablesMap
protected Map<String,JRFillVariable> getVariablesMap()
Returns the report variables indexed by name.- Returns:
- the report variables map
-
getField
protected JRFillField getField(String fieldName)
Returns a report field.- Parameters:
fieldName- the field name- Returns:
- the field
-
getBandReportParent
protected BandReportFillerParent getBandReportParent()
-
getStyledTextParser
public JRStyledTextParser getStyledTextParser()
-
getStyledTextUtil
protected JRStyledTextUtil getStyledTextUtil()
-
getCurrentPageCount
public int getCurrentPageCount()
Returns the number of generated master print pages.- Returns:
- the number of generated master print pages
-
getDefaultStyle
public JRStyle getDefaultStyle()
Description copied from interface:JRDefaultStyleProviderReturns a default style.- Specified by:
getDefaultStylein interfaceJRDefaultStyleProvider
-
getStyleResolver
public StyleResolver getStyleResolver()
Description copied from interface:JRDefaultStyleProviderReturns a style resolver.- Specified by:
getStyleResolverin interfaceJRDefaultStyleProvider
-
isSubreportRunToBottom
protected boolean isSubreportRunToBottom()
-
getCurrentPage
public JRPrintPage getCurrentPage()
-
getCurrentPageContentsWidth
protected int getCurrentPageContentsWidth()
-
setPageHeight
protected abstract void setPageHeight(int pageHeight)
-
fill
@continuable public JasperPrint fill(Map<String,Object> parameterValues) throws JRException
- Specified by:
fillin interfaceReportFiller- Throws:
JRException
-
addPrintStyle
public void addPrintStyle(JRStyle style) throws JRException
- Throws:
JRException
-
addDefaultStyleListener
protected void addDefaultStyleListener(JRBaseFiller.DefaultStyleListener listener)
-
setDefaultStyle
protected void setDefaultStyle(JRStyle style)
-
loadStyles
protected void loadStyles() throws JRException- Throws:
JRException
-
collectStyles
protected List<JRStyle> collectStyles() throws JRException
- Throws:
JRException
-
collectTemplates
protected void collectTemplates() throws JRException- Throws:
JRException
-
getTemplates
public List<JRTemplate> getTemplates()
-
collectTemplateStyles
protected List<JRStyle> collectTemplateStyles() throws JRException
- Throws:
JRException
-
collectStyles
protected void collectStyles(ReportTemplateSource template, List<JRStyle> externalStyles, Set<String> loadedLocations) throws JRException
- Throws:
JRException
-
collectStyles
protected void collectStyles(ReportTemplateSource templateSource, List<JRStyle> externalStyles, Set<String> loadedLocations, Set<String> templateParentLocations) throws JRException
- Throws:
JRException
-
collectIncludedTemplates
protected void collectIncludedTemplates(ReportTemplateSource templateSource, List<JRStyle> externalStyles, Set<String> loadedLocations, Set<String> templateParentLocations) throws JRException
- Throws:
JRException
-
lookupExternalDefaultStyle
protected void lookupExternalDefaultStyle(Collection<JRStyle> styleList)
-
fillReport
@continuable protected abstract void fillReport() throws JRException- Throws:
JRException
-
ignorePaginationSet
protected void ignorePaginationSet(Map<String,Object> parameterValues)
- Specified by:
ignorePaginationSetin classBaseReportFiller
-
recordUsedPageHeight
protected void recordUsedPageHeight(int pageHeight)
-
getResourceBundle
protected ResourceBundle getResourceBundle()
Returns the report resource bundle.- Returns:
- the report resource bundle
-
getWhenNoDataType
protected WhenNoDataTypeEnum getWhenNoDataType()
-
hasMasterFormatFactory
protected boolean hasMasterFormatFactory()
-
hasMasterLocale
protected boolean hasMasterLocale()
-
hasMasterTimeZone
protected boolean hasMasterTimeZone()
-
setParameter
protected void setParameter(String parameterName, Object value) throws JRException
Sets a parameter's value.- Parameters:
parameterName- the parameter namevalue- the value- Throws:
JRException
-
setParameter
protected void setParameter(JRFillParameter parameter, Object value) throws JRException
Sets a parameter's value.- Parameters:
parameter- the parametervalue- the value- Throws:
JRException
-
next
protected boolean next() throws JRException- Throws:
JRException
-
resolveReportBoundElements
protected void resolveReportBoundElements() throws JRExceptionResolves elements which are to be evaluated at report level.- Throws:
JRException
-
resolvePageBoundElements
protected void resolvePageBoundElements(byte evaluation) throws JRExceptionResolves elements which are to be evaluated at page level.- Parameters:
evaluation- the evaluation type- Throws:
JRException
-
resolveColumnBoundElements
protected void resolveColumnBoundElements(byte evaluation) throws JRExceptionResolves elements which are to be evaluated at column level.- Parameters:
evaluation- the evaluation type- Throws:
JRException
-
resolveGroupBoundElements
protected void resolveGroupBoundElements(byte evaluation, boolean isFinal) throws JRExceptionResolves elements which are to be evaluated at group level.- Parameters:
evaluation- the evaluation typeisFinal-- Throws:
JRException
-
newPage
protected JRPrintPage newPage()
-
resolveBandBoundElements
protected void resolveBandBoundElements(JRFillBand band, byte evaluation) throws JRException
Resloves elements which are to be evaluated at band level.- Parameters:
band- the bandevaluation- the evaluation type- Throws:
JRException
-
registerSubfiller
protected void registerSubfiller(JRBaseFiller subfiller)
-
unregisterSubfiller
protected void unregisterSubfiller(JRBaseFiller subfiller)
-
fillBand
protected void fillBand(JRPrintBand band)
-
recordUsedWidth
protected void recordUsedWidth(JRPrintElement element)
-
addPage
protected void addPage(JRPrintPage page)
-
addPageToParent
@continuable protected void addPageToParent(boolean ended) throws JRException- Throws:
JRException
-
setMasterPageVariables
protected void setMasterPageVariables(int currentPageIndex, int totalPages)
-
getWhenResourceMissingType
protected WhenResourceMissingTypeEnum getWhenResourceMissingType()
-
isBandOverFlowAllowed
protected boolean isBandOverFlowAllowed()
-
setBandOverFlowAllowed
protected void setBandOverFlowAllowed(boolean splittableBand)
-
isReorderBandElements
protected boolean isReorderBandElements()
-
setReorderBandElements
protected void setReorderBandElements(boolean isReorderBandElements)
-
isLegacyTextMeasuring
protected boolean isLegacyTextMeasuring()
Deprecated.To be removed.
-
getMasterColumnCount
protected int getMasterColumnCount()
-
getMasterFiller
public BaseReportFiller getMasterFiller()
Returns the top-level (master) filler object.- Returns:
- the master filler object
-
addBoundElement
protected void addBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, String groupName, JRFillBand band)
-
addBoundElement
protected void addBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, JRGroup group, JRFillBand band)
-
addBoundElement
protected void addBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime)
-
currentPageIndex
protected int currentPageIndex()
-
subreportPageFilled
protected void subreportPageFilled(JRPrintPage subreportPage)
-
moveBoundActions
protected void moveBoundActions(FillPageKey subreportKey, FillPageKey parentKey)
-
isPageFinal
public boolean isPageFinal(int pageIdx)
- Specified by:
isPageFinalin interfaceReportFiller
-
isPageFinal
public boolean isPageFinal(JRPrintPage page)
-
hasBoundActions
protected boolean hasBoundActions(JRPrintPage page)
-
getGroup
protected JRFillGroup getGroup(String groupName)
-
getKeepTogetherGroup
protected JRFillGroup getKeepTogetherGroup()
-
createReportTemplates
protected void createReportTemplates(JRFillObjectFactory factory)
-
getFillerId
protected int getFillerId()
-
assignElementId
protected PrintElementOriginator assignElementId(JRFillElement fillElement)
-
-