Package net.sf.jasperreports.engine.fill
Class JRFillObjectFactory
- java.lang.Object
-
- net.sf.jasperreports.engine.JRAbstractObjectFactory
-
- net.sf.jasperreports.engine.fill.JRFillObjectFactory
-
- All Implemented Interfaces:
JRVisitor
- Direct Known Subclasses:
DatasetExecution.ObjectFactory
,FillListDatasetFactory
,IconLabelFillObjectFactory
,JRFillCrosstabObjectFactory
public class JRFillObjectFactory extends JRAbstractObjectFactory
A factory used to instantiate fill objects based on compiled report objects.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
JRFillObjectFactory.StylesList
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_STYLE_NOT_FOUND
static String
EXCEPTION_MESSAGE_KEY_UNRESOLVED_STYLE
protected JRBaseFiller
filler
protected BaseReportFiller
reportFiller
protected JRFillObjectFactory.StylesList
stylesMap
-
Constructor Summary
Constructors Modifier Constructor Description JRFillObjectFactory(BaseReportFiller reportFiller)
protected
JRFillObjectFactory(JRBaseFiller filler)
JRFillObjectFactory(JRBaseFiller filler, JRFillExpressionEvaluator expressionEvaluator)
JRFillObjectFactory(JRFillObjectFactory parent, JRFillExpressionEvaluator expressionEvaluator)
-
Method Summary
-
Methods inherited from class net.sf.jasperreports.engine.JRAbstractObjectFactory
get, getExpression, getFont, getVisitResult, put, setVisitResult
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_UNRESOLVED_STYLE
public static final String EXCEPTION_MESSAGE_KEY_UNRESOLVED_STYLE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_STYLE_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_STYLE_NOT_FOUND
- See Also:
- Constant Field Values
-
filler
protected JRBaseFiller filler
-
reportFiller
protected BaseReportFiller reportFiller
-
stylesMap
protected JRFillObjectFactory.StylesList stylesMap
-
-
Constructor Detail
-
JRFillObjectFactory
protected JRFillObjectFactory(JRBaseFiller filler)
-
JRFillObjectFactory
public JRFillObjectFactory(JRBaseFiller filler, JRFillExpressionEvaluator expressionEvaluator)
-
JRFillObjectFactory
public JRFillObjectFactory(JRFillObjectFactory parent, JRFillExpressionEvaluator expressionEvaluator)
-
JRFillObjectFactory
public JRFillObjectFactory(BaseReportFiller reportFiller)
-
-
Method Detail
-
getExpressionEvaluator
public JRFillExpressionEvaluator getExpressionEvaluator()
Returns the expression evaluator which is to be used by objects created by this factory.- Returns:
- the expression evaluator associated with this factory
-
getElementDatasets
protected JRFillElementDataset[] getElementDatasets(JRDataset dataset)
-
registerDelayedStyleSetter
protected void registerDelayedStyleSetter(JRStyleSetter delayedSetter, String styleName)
-
registerDelayedStyleSetter
public void registerDelayedStyleSetter(JRStyleSetter delayedSetter, JRStyleContainer styleContainer)
-
getStyle
public JRBaseStyle getStyle(JRStyle style)
- Specified by:
getStyle
in classJRAbstractObjectFactory
-
renameExistingStyle
protected void renameExistingStyle(String name)
-
setStyle
public void setStyle(JRStyleSetter setter, JRStyleContainer styleContainer)
Description copied from class:JRAbstractObjectFactory
Sets a style or a style reference on an object. If the container includes a style (seegetStyle()
, a copy of this style will be created viagetStyle(JRStyle)
and set on the object. In addition to this, the implementation needs to handle the case when the container includes an external style reference (seegetStyleNameReference()
.- Specified by:
setStyle
in classJRAbstractObjectFactory
- Parameters:
setter
- a setter for the object on which the style should be set.styleContainer
- the original style container- See Also:
JRAbstractObjectFactory.getStyle(JRStyle)
-
getParameter
protected JRFillParameter getParameter(JRParameter parameter)
-
getField
protected JRFillField getField(JRField field)
-
getVariable
public JRFillVariable getVariable(JRVariable variable)
-
getGroup
public JRFillGroup getGroup(JRGroup group)
-
getSection
protected JRFillSection getSection(JRSection section)
-
getBand
protected JRFillBand getBand(JRBand band)
-
visitElementGroup
public void visitElementGroup(JRElementGroup elementGroup)
-
visitBreak
public void visitBreak(JRBreak breakElement)
-
visitLine
public void visitLine(JRLine line)
-
visitRectangle
public void visitRectangle(JRRectangle rectangle)
-
visitEllipse
public void visitEllipse(JREllipse ellipse)
-
visitImage
public void visitImage(JRImage image)
-
visitStaticText
public void visitStaticText(JRStaticText staticText)
-
visitTextField
public void visitTextField(JRTextField textField)
-
visitSubreport
public void visitSubreport(JRSubreport subreport)
-
getSubreportReturnValue
protected JRFillVariableReturnValue getSubreportReturnValue(JRSubreportReturnValue returnValue)
-
getReturnValue
protected JRFillVariableReturnValue getReturnValue(VariableReturnValue returnValue)
-
getReturnValue
protected JRFillExpressionReturnValue getReturnValue(ExpressionReturnValue returnValue)
-
visitCrosstab
public void visitCrosstab(JRCrosstab crosstabElement)
-
getCrosstabDataset
public JRFillCrosstab.JRFillCrosstabDataset getCrosstabDataset(JRCrosstabDataset dataset, JRFillCrosstab fillCrosstab)
-
getDataset
public JRFillDataset getDataset(JRDataset dataset)
-
registerElementDataset
public void registerElementDataset(JRFillElementDataset elementDataset)
Register an element dataset with the report filler.Registration of element datasets is required in order for the filler to increment the datasets when iterating through the datasource.
- Parameters:
elementDataset
- the dataset to register
-
getElementDatasetsList
protected List<JRFillElementDataset> getElementDatasetsList(String datasetName)
-
trackDatasetRuns
public void trackDatasetRuns()
-
registerDatasetRun
public void registerDatasetRun(JRFillDatasetRun datasetRun)
-
getTrackedDatasetRuns
public List<JRFillDatasetRun> getTrackedDatasetRuns()
-
getDatasetRun
public JRFillDatasetRun getDatasetRun(JRDatasetRun datasetRun)
-
getCrosstabParameter
public JRFillCrosstabParameter getCrosstabParameter(JRCrosstabParameter parameter)
-
visitFrame
public void visitFrame(JRFrame frame)
-
getReportFiller
public BaseReportFiller getReportFiller()
-
getFiller
public JRBaseFiller getFiller()
Returns the current report filler.- Returns:
- the current report filler
-
getConditionalStyle
public JRConditionalStyle getConditionalStyle(JRConditionalStyle conditionalStyle, JRStyle style)
- Specified by:
getConditionalStyle
in classJRAbstractObjectFactory
-
getExpression
public JRExpression getExpression(JRExpression expression, boolean assignNotUsedId)
- Specified by:
getExpression
in classJRAbstractObjectFactory
-
getReportTemplate
public JRFillReportTemplate getReportTemplate(JRReportTemplate template)
-
collectUsedStyles
protected void collectUsedStyles(JRStyle style, Map<JRStyle,Object> usedStylesMap, Map<String,JRStyle> allStylesMap)
-
useDelayedStyle
protected void useDelayedStyle(JRStyle style)
-
checkUnresolvedReferences
protected void checkUnresolvedReferences()
-
getDefaultStyleProvider
public JRDefaultStyleProvider getDefaultStyleProvider()
- Specified by:
getDefaultStyleProvider
in classJRAbstractObjectFactory
-
visitComponentElement
public void visitComponentElement(JRComponentElement componentElement)
Description copied from interface:JRVisitor
Visits a component wrapper element.- Parameters:
componentElement
- the element to visit
-
visitGenericElement
public void visitGenericElement(JRGenericElement element)
Description copied from interface:JRVisitor
Visits a generic report element.- Parameters:
element
- the element to visit
-
getBidimensionalData
public FillMultiAxisData getBidimensionalData(MultiAxisData data)
-
-