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
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected JRFillBandList ofJRFillBandobjects containing all bands of the report.protected intprotected intprotected RunDirectionEnumprotected JRFillBandprotected intprotected JRFillBandprotected intprotected intprotected intprotected intprotected intprotected JRStyleprotected ElementRangeprotected JRFillSectionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected ElementRangeprotected GroupFooterElementRangeprotected JRFillGroup[]protected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected intprotected JRFillBandprotected intprotected intprotected JRFillBandprotected JRFillSectionprotected Stringprotected JRFillBandprotected intprotected intprotected OrientationEnumprotected ElementRangeprotected ElementRangeprotected JRFillBandprotected JRFillBandprotected intprotected intprotected Integerprotected PrintOrderEnumprotected JRPrintPageprotected intprotected JRFillReportTemplate[]protected intprotected StyleResolverprotected JRStyle[]protected Map<Integer, JRBaseFiller> Collection of subfillersprotected JRFillBandprotected List<ReportTemplateSource> protected JRFillBandprotected intprotected intFields 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
ConstructorsModifierConstructorDescriptionprotectedJRBaseFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, BandReportFillerParent parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime) voidaddBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, String groupName, JRFillBand band) protected voidprotected 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 voidcollectStyles(ReportTemplateSource template, List<JRStyle> externalStyles, Set<String> loadedLocations) protected voidcollectStyles(ReportTemplateSource templateSource, List<JRStyle> externalStyles, Set<String> loadedLocations, Set<String> templateParentLocations) protected voidprotected voidcreateReportTemplates(JRFillObjectFactory factory) protected intprotected voidfillBand(JRPrintBand band) protected abstract voidprotected BandReportFillerParentprotected intintReturns the number of generated master print pages.getDateFormat(String pattern) protected FormatgetDateFormat(String pattern, TimeZone timeZone) Returns a default style.protected JRFillFieldReturns a report field.protected Map<String, JRFillField> Returns the report fields indexed by name.protected intprotected JRFillGroupprotected JRFillGroupprotected intReturns the top-level (master) filler object.protected intgetMaxPageHeight(Map<String, Object> parameterValues) protected intgetMaxPageWidth(Map<String, Object> parameterValues) getNumberFormat(String pattern) protected ResourceBundleReturns the report resource bundle.protected JRStyledTextUtilReturns a style resolver.protected Map<String, JRFillVariable> Returns the report variables indexed by name.protected WhenNoDataTypeEnumprotected WhenResourceMissingTypeEnumprotected booleanhasBoundActions(JRPrintPage page) protected booleanprotected booleanprotected booleanprotected voidignorePaginationSet(Map<String, Object> parameterValues) protected JRFillObjectFactoryprotected booleanprotected booleanDeprecated.To be removed.booleanbooleanisPageFinal(int pageIdx) booleanisPageFinal(JRPrintPage page) protected booleanprotected booleanprotected voidprotected voidprotected 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 voidResolves 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 Details
-
EXCEPTION_MESSAGE_KEY_INFINITE_LOOP_CREATING_NEW_PAGE
- See Also:
-
EXCEPTION_MESSAGE_KEY_COLUMN_HEADER_OVERFLOW_INFINITE_LOOP
- See Also:
-
EXCEPTION_MESSAGE_KEY_CIRCULAR_DEPENDENCY_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_EXTERNAL_STYLE_NAME_NOT_SET
- See Also:
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_GROUP
- See Also:
-
EXCEPTION_MESSAGE_KEY_PAGE_HEADER_OVERFLOW_INFINITE_LOOP
- See Also:
-
EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_SECTION_TYPE
- See Also:
-
EXCEPTION_MESSAGE_KEY_KEEP_TOGETHER_CONTENT_DOES_NOT_FIT
- See Also:
-
name
-
columnCount
protected int columnCount -
printOrder
-
columnDirection
-
pageWidth
protected int pageWidth -
maxPageWidth
protected int maxPageWidth -
pageHeight
protected int pageHeight -
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 -
reportTemplates
-
templates
-
defaultStyle
-
styleResolver
-
styles
-
groups
-
missingFillSection
-
missingFillBand
-
background
-
title
-
pageHeader
-
columnHeader
-
detailSection
-
summary
-
noData
-
printPage
-
printPageContentsWidth
protected int printPageContentsWidth -
bands
List ofJRFillBandobjects containing all bands of the report. -
subfillers
Collection of subfillers -
dateFormatCache
-
numberFormatCache
-
detailElementRange
-
isCreatingNewPage
protected boolean isCreatingNewPage -
isNewPage
protected boolean isNewPage -
isNewColumn
protected boolean isNewColumn -
isFirstPageBand
protected boolean isFirstPageBand -
isFirstColumnBand
protected boolean isFirstColumnBand -
atLeastOneElementIsToPrint
protected boolean atLeastOneElementIsToPrint -
isCrtRecordOnPage
protected boolean isCrtRecordOnPage -
isCrtRecordOnColumn
protected boolean isCrtRecordOnColumn -
columnIndex
protected int columnIndex -
offsetX
protected int offsetX -
offsetY
protected int offsetY -
columnHeaderOffsetY
protected int columnHeaderOffsetY -
isReorderBandElements
protected boolean isReorderBandElements -
usedPageHeight
protected int usedPageHeight
-
-
Constructor Details
-
JRBaseFiller
protected JRBaseFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, BandReportFillerParent parent) throws JRException - Throws:
JRException
-
-
Method Details
-
jasperReportSet
protected void jasperReportSet()- Specified by:
jasperReportSetin classBaseReportFiller
-
initFillFactory
- Specified by:
initFillFactoryin classBaseReportFiller
-
setJasperReportsContext
- Overrides:
setJasperReportsContextin classBaseReportFiller
-
getFieldsMap
Returns the report fields indexed by name.- Returns:
- the report fields map
-
getVariablesMap
Returns the report variables indexed by name.- Returns:
- the report variables map
-
getField
Returns a report field.- Parameters:
fieldName- the field name- Returns:
- the field
-
getBandReportParent
-
getPrintTransferPropertyPrefixes
-
getStyledTextParser
-
getStyledTextUtil
-
getCurrentPageCount
public int getCurrentPageCount()Returns the number of generated master print pages.- Returns:
- the number of generated master print pages
-
getDefaultStyle
Description copied from interface:JRDefaultStyleProviderReturns a default style.- Specified by:
getDefaultStylein interfaceJRDefaultStyleProvider
-
getStyleResolver
Description copied from interface:JRDefaultStyleProviderReturns a style resolver.- Specified by:
getStyleResolverin interfaceJRDefaultStyleProvider
-
isSubreportRunToBottom
protected boolean isSubreportRunToBottom() -
getCurrentPage
-
getCurrentPageContentsWidth
protected int getCurrentPageContentsWidth() -
setPageHeight
protected abstract void setPageHeight(int pageHeight) -
fill
- Specified by:
fillin interfaceReportFiller- Throws:
JRException
-
addPrintStyle
- Throws:
JRException
-
addDefaultStyleListener
-
setDefaultStyle
-
loadStyles
- Throws:
JRException
-
registerReportStyles
-
collectStyles
- Throws:
JRException
-
collectTemplates
- Throws:
JRException
-
getTemplates
-
collectTemplateStyles
- 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
-
fillReport
- Throws:
JRException
-
ignorePaginationSet
- Specified by:
ignorePaginationSetin classBaseReportFiller
-
getMaxPageHeight
-
getMaxPageWidth
-
recordUsedPageHeight
protected void recordUsedPageHeight(int pageHeight) -
getResourceBundle
Returns the report resource bundle.- Returns:
- the report resource bundle
-
getWhenNoDataType
-
getDateFormat
-
getDateFormat
-
getNumberFormat
-
hasMasterFormatFactory
protected boolean hasMasterFormatFactory() -
hasMasterLocale
protected boolean hasMasterLocale() -
hasMasterTimeZone
protected boolean hasMasterTimeZone() -
setParameter
Sets a parameter's value.- Parameters:
parameterName- the parameter namevalue- the value- Throws:
JRException
-
setParameter
Sets a parameter's value.- Parameters:
parameter- the parametervalue- the value- Throws:
JRException
-
next
- Throws:
JRException
-
resolveReportBoundElements
Resolves elements which are to be evaluated at report level.- Throws:
JRException
-
resolvePageBoundElements
Resolves elements which are to be evaluated at page level.- Parameters:
evaluation- the evaluation type- Throws:
JRException
-
resolveColumnBoundElements
Resolves elements which are to be evaluated at column level.- Parameters:
evaluation- the evaluation type- Throws:
JRException
-
resolveGroupBoundElements
Resolves elements which are to be evaluated at group level.- Parameters:
evaluation- the evaluation typeisFinal-- Throws:
JRException
-
newPage
-
resolveBandBoundElements
Resloves elements which are to be evaluated at band level.- Parameters:
band- the bandevaluation- the evaluation type- Throws:
JRException
-
registerSubfiller
-
unregisterSubfiller
-
fillBand
-
recordUsedWidth
-
addPage
-
addPageToParent
- Throws:
JRException
-
setMasterPageVariables
protected void setMasterPageVariables(int currentPageIndex, int totalPages) -
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. -
isPageBreakInhibited
public boolean isPageBreakInhibited()- Specified by:
isPageBreakInhibitedin classBaseReportFiller
-
getMasterColumnCount
protected int getMasterColumnCount() -
getMasterFiller
Returns the top-level (master) filler object.- Returns:
- the master filler object
-
addBoundElement
public void addBoundElement(JRFillElement element, JRPrintElement printElement, EvaluationTimeEnum evaluationType, String groupName, JRFillBand band) -
addBoundElement
protected void addBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime) -
currentPageIndex
protected int currentPageIndex() -
subreportPageFilled
-
moveBoundActions
-
isPageFinal
public boolean isPageFinal(int pageIdx) - Specified by:
isPageFinalin interfaceReportFiller
-
isPageFinal
-
hasBoundActions
-
getGroup
-
getKeepTogetherGroup
-
createReportTemplates
-
getFillerId
protected int getFillerId() -
assignElementId
-