net.sf.jasperreports.engine.fill
Class JRBaseFiller

java.lang.Object
  extended bynet.sf.jasperreports.engine.fill.JRBaseFiller
All Implemented Interfaces:
JRDefaultFontProvider
Direct Known Subclasses:
JRHorizontalFiller, JRVerticalFiller

public abstract class JRBaseFiller
extends java.lang.Object
implements JRDefaultFontProvider

Version:
$Id: JRBaseFiller.java,v 1.53 2005/09/07 13:58:26 teodord Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
 class JRBaseFiller.BoundElementMap
          Map class to be used for bound elements.
protected static class JRBaseFiller.PageIdentityDataProvider
           
 
Field Summary
protected  JRFillBand background
           
protected  java.util.List bands
          List of JRFillBand objects containing all bands of the report.
protected  int bottomMargin
           
protected  JRCalculator calculator
           
protected  JRBaseFiller.BoundElementMap columnBoundElements
          Map of elements to be resolved at column level.
protected  int columnCount
           
protected  JRFillBand columnFooter
           
protected  JRFillBand columnHeader
           
protected  int columnSpacing
           
protected  int columnWidth
           
protected  JRFillChartDataset[] datasets
           
protected  JRDataSource dataSource
           
protected  JRReportFont defaultFont
           
protected  JRFillBand detail
           
protected  JRFillField[] fields
           
protected  java.util.Map fieldsMap
           
protected  JRFillContext fillContext
           
protected  JRReportFont[] fonts
           
protected  java.util.List formattedTextFields
           
protected  java.util.Map groupBoundElements
          Maps of elements to be resolved at group levels.
protected  JRFillGroup[] groups
           
protected  boolean isFloatColumnFooter
           
protected  boolean isParametersAlreadySet
           
protected  boolean isSummaryNewPage
           
protected  boolean isTitleNewPage
           
protected  JasperPrint jasperPrint
           
protected  JRFillBand lastPageFooter
           
protected  int leftMargin
           
protected  java.util.Map loadedSubreports
           
protected  java.util.Locale locale
           
protected  JRFillBand missingFillBand
           
protected  java.lang.String name
           
protected  byte orientation
           
protected  JRBaseFiller.BoundElementMap pageBoundElements
          Map of elements to be resolved at page level.
protected  JRFillBand pageFooter
           
protected  JRFillBand pageHeader
           
protected  int pageHeight
           
protected  int pageWidth
           
protected  JRFillParameter[] parameters
           
protected  java.util.Map parametersMap
           
protected  JRBaseFiller parentFiller
           
protected  net.sf.jasperreports.engine.fill.JRBaseFiller.BoundElements perPageBoundElements
          All bound elements per page.
protected  byte printOrder
           
protected  JRPrintPage printPage
           
protected  int printPageStretchHeight
           
protected  JRQuery query
           
protected  JRBaseFiller.BoundElementMap reportBoundElements
          Map of elements to be resolved at report level.
protected  int reportCount
           
protected  java.lang.Integer reportMaxCount
           
protected  java.util.ResourceBundle resourceBundle
           
protected  java.lang.String resourceBundleBaseName
           
protected  int rightMargin
           
protected  JRAbstractScriptlet scriptlet
           
protected  java.lang.String scriptletClassName
           
protected  java.util.Set subfillers
          Collection of subfillers
protected  JRFillBand summary
           
protected  JRFillBand title
           
protected  int topMargin
           
protected  java.util.Set variableCalculationReqs
           
protected  JRFillVariable[] variables
           
protected  java.util.Map variablesMap
           
protected  JRVirtualizer virtualizer
           
protected  byte whenNoDataType
           
protected  byte whenResourceMissingType
          the resource missing handling type
 
Constructor Summary
protected JRBaseFiller(JasperReport jasperReport, JRCalculator initCalculator, JRBaseFiller parentFiller)
           
 
Method Summary
protected static void addElements(java.util.Set allElements, java.util.Map pageMap, JRVirtualPrintPage page)
          Collects elements from a map.
protected static void addGroupElements(java.util.Set allElements, java.util.Map groupMap, JRVirtualPrintPage page)
          Collects elements from a group map.
protected  void addPage(JRPrintPage page)
           
protected  void addPageIdentityDataProvider()
           
protected  void addVariableCalculationReq(java.lang.String variableName, byte calculation)
          Adds a variable calculation request.
 void cancelFill()
          Cancells the fill process.
protected static JRVirtualPrintPage.ObjectIDPair[] createIdentityData(java.util.Set allElements)
          Creates identity data out of a list of elements.
protected  JRAbstractScriptlet createScriptlet()
           
 JasperPrint fill(java.util.Map parameterValues, java.sql.Connection conn)
           
 JasperPrint fill(java.util.Map parameterValues, JRDataSource ds)
           
protected abstract  void fillReport()
           
protected  JRPrintPage getCurrentPage()
           
protected  int getCurrentPageStretchHeight()
           
 JRReportFont getDefaultFont()
          Returns a default font.
protected  JRReportFont[] getFonts()
           
 JasperPrint getJasperPrint()
           
 JRStyledTextParser getStyledTextParser()
           
protected  java.lang.Object getVariableValue(java.lang.String variableName)
          Returns the value of a variable.
protected  boolean isInterrupted()
           
protected  boolean isSubreport()
           
protected  java.util.ResourceBundle loadResourceBundle()
           
protected  JRPrintPage newPage()
           
protected  boolean next()
           
protected  void registerSubfiller(JRBaseFiller subfiller)
           
protected  void removePageIdentityDataProvider()
           
protected  void resolveBandBoundElements(JRFillBand band, byte evaluation)
          Resloves elements which are to be evaluated at band level.
protected  void resolveColumnBoundElements(byte evaluation)
          Resolves elements which are to be evaluated at column level.
protected  void resolveGroupBoundElements(byte evaluation, boolean isFinal)
          Resolves elements which are to be evaluated at group level.
protected  void resolvePageBoundElements(byte evaluation)
          Resolves elements which are to be evaluated at page level.
protected  void resolveReportBoundElements()
          Resolves elements which are to be evaluated at report level.
protected  void setInterrupted(boolean isInterrupted)
           
protected abstract  void setPageHeight(int pageHeight)
           
protected  void setParameter(JRFillParameter parameter, java.lang.Object value)
           
protected  void setParameters(java.util.Map parameterValues)
           
protected  void unregisterSubfiller(JRBaseFiller subfiller)
           
protected static void updateGroupIdentityData(java.util.Map pageGroupMap, JRVirtualPrintPage page, java.util.Map groupMap, JRVirtualPrintPage.ObjectIDPair[] identityData)
          Updates group element maps on page devirtualization.
protected static void updateIdentityData(java.util.Map pageMap, JRVirtualPrintPage page, JRBaseFiller.BoundElementMap boundElements, JRVirtualPrintPage.ObjectIDPair[] identityData)
          Updates element maps on page devirtualization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFiller

protected JRBaseFiller parentFiller

name

protected java.lang.String name

columnCount

protected int columnCount

printOrder

protected byte printOrder

pageWidth

protected int pageWidth

pageHeight

protected int pageHeight

orientation

protected byte orientation

whenNoDataType

protected byte whenNoDataType

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

isFloatColumnFooter

protected boolean isFloatColumnFooter

scriptletClassName

protected java.lang.String scriptletClassName

resourceBundleBaseName

protected java.lang.String resourceBundleBaseName

whenResourceMissingType

protected byte whenResourceMissingType
the resource missing handling type


defaultFont

protected JRReportFont defaultFont

fonts

protected JRReportFont[] fonts

parameters

protected JRFillParameter[] parameters

parametersMap

protected java.util.Map parametersMap

query

protected JRQuery query

fields

protected JRFillField[] fields

fieldsMap

protected java.util.Map fieldsMap

variables

protected JRFillVariable[] variables

variablesMap

protected java.util.Map variablesMap

groups

protected JRFillGroup[] groups

missingFillBand

protected JRFillBand missingFillBand

background

protected JRFillBand background

title

protected JRFillBand title

pageHeader

protected JRFillBand pageHeader

columnHeader

protected JRFillBand columnHeader

detail

protected JRFillBand detail

columnFooter

protected JRFillBand columnFooter

pageFooter

protected JRFillBand pageFooter

lastPageFooter

protected JRFillBand lastPageFooter

summary

protected JRFillBand summary

calculator

protected JRCalculator calculator

locale

protected java.util.Locale locale

resourceBundle

protected java.util.ResourceBundle resourceBundle

scriptlet

protected JRAbstractScriptlet scriptlet

dataSource

protected JRDataSource dataSource

virtualizer

protected JRVirtualizer virtualizer

reportMaxCount

protected java.lang.Integer reportMaxCount

reportCount

protected int reportCount

formattedTextFields

protected java.util.List formattedTextFields

loadedSubreports

protected java.util.Map loadedSubreports

fillContext

protected JRFillContext fillContext

perPageBoundElements

protected net.sf.jasperreports.engine.fill.JRBaseFiller.BoundElements perPageBoundElements
All bound elements per page.


reportBoundElements

protected JRBaseFiller.BoundElementMap reportBoundElements
Map of elements to be resolved at report level.


pageBoundElements

protected JRBaseFiller.BoundElementMap pageBoundElements
Map of elements to be resolved at page level.


columnBoundElements

protected JRBaseFiller.BoundElementMap columnBoundElements
Map of elements to be resolved at column level.


groupBoundElements

protected java.util.Map groupBoundElements
Maps of elements to be resolved at group levels.


jasperPrint

protected JasperPrint jasperPrint

printPage

protected JRPrintPage printPage

printPageStretchHeight

protected int printPageStretchHeight

isParametersAlreadySet

protected boolean isParametersAlreadySet

datasets

protected JRFillChartDataset[] datasets

bands

protected java.util.List bands
List of JRFillBand objects containing all bands of the report.


subfillers

protected java.util.Set subfillers
Collection of subfillers


variableCalculationReqs

protected java.util.Set variableCalculationReqs
Constructor Detail

JRBaseFiller

protected JRBaseFiller(JasperReport jasperReport,
                       JRCalculator initCalculator,
                       JRBaseFiller parentFiller)
                throws JRException
Method Detail

getStyledTextParser

public JRStyledTextParser getStyledTextParser()

getJasperPrint

public JasperPrint getJasperPrint()

getDefaultFont

public JRReportFont getDefaultFont()
Description copied from interface: JRDefaultFontProvider
Returns a default font.

Specified by:
getDefaultFont in interface JRDefaultFontProvider

isSubreport

protected boolean isSubreport()

isInterrupted

protected boolean isInterrupted()

setInterrupted

protected void setInterrupted(boolean isInterrupted)

getCurrentPage

protected JRPrintPage getCurrentPage()

getFonts

protected JRReportFont[] getFonts()

getCurrentPageStretchHeight

protected int getCurrentPageStretchHeight()

setPageHeight

protected abstract void setPageHeight(int pageHeight)

fill

public JasperPrint fill(java.util.Map parameterValues,
                        java.sql.Connection conn)
                 throws JRException
Throws:
JRException

fill

public JasperPrint fill(java.util.Map parameterValues,
                        JRDataSource ds)
                 throws JRException
Throws:
JRException

fillReport

protected abstract void fillReport()
                            throws JRException
Throws:
JRException

loadResourceBundle

protected java.util.ResourceBundle loadResourceBundle()

createScriptlet

protected JRAbstractScriptlet createScriptlet()
                                       throws JRException
Throws:
JRException

setParameters

protected void setParameters(java.util.Map parameterValues)
                      throws JRException
Throws:
JRException

setParameter

protected void setParameter(JRFillParameter parameter,
                            java.lang.Object value)
                     throws JRException
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()

getVariableValue

protected java.lang.Object getVariableValue(java.lang.String variableName)
                                     throws JRException
Returns the value of a variable.

Parameters:
variableName - the variable name
Returns:
the variable value
Throws:
JRException

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

createIdentityData

protected static JRVirtualPrintPage.ObjectIDPair[] createIdentityData(java.util.Set allElements)
Creates identity data out of a list of elements.

Parameters:
allElements - the elements
Returns:
the identity data

addElements

protected static void addElements(java.util.Set allElements,
                                  java.util.Map pageMap,
                                  JRVirtualPrintPage page)
Collects elements from a map.

Parameters:
allElements - the elements are collected here
pageMap - the page map
page - the page

addGroupElements

protected static void addGroupElements(java.util.Set allElements,
                                       java.util.Map groupMap,
                                       JRVirtualPrintPage page)
Collects elements from a group map.

Parameters:
allElements - the elements are collected here
groupMap - the group map
page - the page

updateIdentityData

protected static void updateIdentityData(java.util.Map pageMap,
                                         JRVirtualPrintPage page,
                                         JRBaseFiller.BoundElementMap boundElements,
                                         JRVirtualPrintPage.ObjectIDPair[] identityData)
Updates element maps on page devirtualization.

Parameters:
pageMap - the page map
page - the page
boundElements - the bound element map
identityData - the identity data

updateGroupIdentityData

protected static void updateGroupIdentityData(java.util.Map pageGroupMap,
                                              JRVirtualPrintPage page,
                                              java.util.Map groupMap,
                                              JRVirtualPrintPage.ObjectIDPair[] identityData)
Updates group element maps on page devirtualization.

Parameters:
pageGroupMap - the page map
page - the page
groupMap - the group map
identityData - the identity data

addVariableCalculationReq

protected void addVariableCalculationReq(java.lang.String variableName,
                                         byte calculation)
Adds a variable calculation request.

Parameters:
variableName - the variable name
calculation - the calculation type

cancelFill

public void cancelFill()
                throws JRException
Cancells the fill process.

Throws:
JRException

registerSubfiller

protected void registerSubfiller(JRBaseFiller subfiller)

unregisterSubfiller

protected void unregisterSubfiller(JRBaseFiller subfiller)

addPage

protected void addPage(JRPrintPage page)

addPageIdentityDataProvider

protected void addPageIdentityDataProvider()

removePageIdentityDataProvider

protected void removePageIdentityDataProvider()


© 2001-2005 JasperSoft Corporation www.jaspersoft.com