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)
  • Field Details

    • EXCEPTION_MESSAGE_KEY_INFINITE_LOOP_CREATING_NEW_PAGE

      public static final String EXCEPTION_MESSAGE_KEY_INFINITE_LOOP_CREATING_NEW_PAGE
      See Also:
    • EXCEPTION_MESSAGE_KEY_COLUMN_HEADER_OVERFLOW_INFINITE_LOOP

      public static final String EXCEPTION_MESSAGE_KEY_COLUMN_HEADER_OVERFLOW_INFINITE_LOOP
      See Also:
    • EXCEPTION_MESSAGE_KEY_CIRCULAR_DEPENDENCY_FOUND

      public static final String EXCEPTION_MESSAGE_KEY_CIRCULAR_DEPENDENCY_FOUND
      See Also:
    • EXCEPTION_MESSAGE_KEY_EXTERNAL_STYLE_NAME_NOT_SET

      public static final String EXCEPTION_MESSAGE_KEY_EXTERNAL_STYLE_NAME_NOT_SET
      See Also:
    • EXCEPTION_MESSAGE_KEY_NO_SUCH_GROUP

      public static final String EXCEPTION_MESSAGE_KEY_NO_SUCH_GROUP
      See Also:
    • EXCEPTION_MESSAGE_KEY_PAGE_HEADER_OVERFLOW_INFINITE_LOOP

      public static final String EXCEPTION_MESSAGE_KEY_PAGE_HEADER_OVERFLOW_INFINITE_LOOP
      See Also:
    • EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_SECTION_TYPE

      public static final String EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_SECTION_TYPE
      See Also:
    • EXCEPTION_MESSAGE_KEY_KEEP_TOGETHER_CONTENT_DOES_NOT_FIT

      public static final String EXCEPTION_MESSAGE_KEY_KEEP_TOGETHER_CONTENT_DOES_NOT_FIT
      See Also:
    • 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
    • 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
    • columnHeader

      protected JRFillBand columnHeader
    • detailSection

      protected JRFillSection detailSection
    • columnFooter

      protected JRFillBand columnFooter
    • 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 of JRFillBand objects containing all bands of the report.
    • subfillers

      protected Map<Integer,JRBaseFiller> subfillers
      Collection of subfillers
    • dateFormatCache

      protected Map<String,Format> dateFormatCache
    • numberFormatCache

      protected Map<String,Format> numberFormatCache
    • 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
    • atLeastOneElementIsToPrint

      protected boolean atLeastOneElementIsToPrint
    • 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 Details

  • Method Details

    • jasperReportSet

      protected void jasperReportSet()
      Specified by:
      jasperReportSet in class BaseReportFiller
    • initFillFactory

      protected JRFillObjectFactory initFillFactory()
      Specified by:
      initFillFactory in class BaseReportFiller
    • setJasperReportsContext

      protected void setJasperReportsContext(JasperReportsContext jasperReportsContext)
      Overrides:
      setJasperReportsContext in class BaseReportFiller
    • 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()
    • getPrintTransferPropertyPrefixes

      protected List<String> getPrintTransferPropertyPrefixes()
    • 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: JRDefaultStyleProvider
      Returns a default style.
      Specified by:
      getDefaultStyle in interface JRDefaultStyleProvider
    • getStyleResolver

      public StyleResolver getStyleResolver()
      Description copied from interface: JRDefaultStyleProvider
      Returns a style resolver.
      Specified by:
      getStyleResolver in interface JRDefaultStyleProvider
    • 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:
      fill in interface ReportFiller
      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
    • registerReportStyles

      public void registerReportStyles(UUID id, List<JRStyle> styles)
    • 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:
      ignorePaginationSet in class BaseReportFiller
    • getMaxPageHeight

      protected int getMaxPageHeight(Map<String,Object> parameterValues)
    • getMaxPageWidth

      protected int getMaxPageWidth(Map<String,Object> parameterValues)
    • recordUsedPageHeight

      protected void recordUsedPageHeight(int pageHeight)
    • getResourceBundle

      protected ResourceBundle getResourceBundle()
      Returns the report resource bundle.
      Returns:
      the report resource bundle
    • getWhenNoDataType

      protected WhenNoDataTypeEnum getWhenNoDataType()
    • getDateFormat

      public Format getDateFormat(String pattern)
    • getDateFormat

      protected Format getDateFormat(String pattern, TimeZone timeZone)
    • getNumberFormat

      public Format getNumberFormat(String pattern)
    • 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 name
      value - the value
      Throws:
      JRException
    • setParameter

      protected void setParameter(JRFillParameter parameter, Object value) throws JRException
      Sets a parameter's value.
      Parameters:
      parameter - the parameter
      value - the value
      Throws:
      JRException
    • next

      protected boolean next() throws JRException
      Throws:
      JRException
    • resolveReportBoundElements

      protected void resolveReportBoundElements() throws JRException
      Resolves elements which are to be evaluated at report level.
      Throws:
      JRException
    • resolvePageBoundElements

      protected void resolvePageBoundElements(byte evaluation) throws JRException
      Resolves elements which are to be evaluated at page level.
      Parameters:
      evaluation - the evaluation type
      Throws:
      JRException
    • resolveColumnBoundElements

      protected void resolveColumnBoundElements(byte evaluation) throws JRException
      Resolves 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 JRException
      Resolves elements which are to be evaluated at group level.
      Parameters:
      evaluation - the evaluation type
      isFinal -
      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 band
      evaluation - 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.
    • isPageBreakInhibited

      public boolean isPageBreakInhibited()
      Specified by:
      isPageBreakInhibited in class BaseReportFiller
    • getMasterColumnCount

      protected int getMasterColumnCount()
    • getMasterFiller

      public BaseReportFiller 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

      protected void subreportPageFilled(JRPrintPage subreportPage)
    • moveBoundActions

      protected void moveBoundActions(FillPageKey subreportKey, FillPageKey parentKey)
    • isPageFinal

      public boolean isPageFinal(int pageIdx)
      Specified by:
      isPageFinal in interface ReportFiller
    • 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)