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 java.lang.String
EXCEPTION_MESSAGE_KEY_STYLE_NOT_FOUND
static java.lang.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 java.lang.String EXCEPTION_MESSAGE_KEY_UNRESOLVED_STYLE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_STYLE_NOT_FOUND
public static final java.lang.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, java.lang.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(java.lang.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)
-
visitChart
public void visitChart(JRChart chart)
-
getPieDataset
public JRPieDataset getPieDataset(JRPieDataset pieDataset)
- Specified by:
getPieDataset
in classJRAbstractObjectFactory
-
getPiePlot
public JRPiePlot getPiePlot(JRPiePlot piePlot)
- Specified by:
getPiePlot
in classJRAbstractObjectFactory
-
getPie3DPlot
public JRPie3DPlot getPie3DPlot(JRPie3DPlot pie3DPlot)
- Specified by:
getPie3DPlot
in classJRAbstractObjectFactory
-
getCategoryDataset
public JRCategoryDataset getCategoryDataset(JRCategoryDataset categoryDataset)
- Specified by:
getCategoryDataset
in classJRAbstractObjectFactory
-
getXyzDataset
public JRXyzDataset getXyzDataset(JRXyzDataset xyzDataset)
- Specified by:
getXyzDataset
in classJRAbstractObjectFactory
-
getXyDataset
public JRXyDataset getXyDataset(JRXyDataset xyDataset)
-
getTimeSeriesDataset
public JRTimeSeriesDataset getTimeSeriesDataset(JRTimeSeriesDataset timeSeriesDataset)
- Specified by:
getTimeSeriesDataset
in classJRAbstractObjectFactory
-
getTimePeriodDataset
public JRTimePeriodDataset getTimePeriodDataset(JRTimePeriodDataset timePeriodDataset)
- Specified by:
getTimePeriodDataset
in classJRAbstractObjectFactory
-
getGanttDataset
public JRGanttDataset getGanttDataset(JRGanttDataset ganttDataset)
-
getPieSeries
public JRPieSeries getPieSeries(JRPieSeries pieSeries)
- Specified by:
getPieSeries
in classJRAbstractObjectFactory
-
getCategorySeries
public JRCategorySeries getCategorySeries(JRCategorySeries categorySeries)
- Specified by:
getCategorySeries
in classJRAbstractObjectFactory
-
getXyzSeries
public JRXyzSeries getXyzSeries(JRXyzSeries xyzSeries)
- Specified by:
getXyzSeries
in classJRAbstractObjectFactory
-
getXySeries
public JRXySeries getXySeries(JRXySeries xySeries)
-
getGanttSeries
public JRGanttSeries getGanttSeries(JRGanttSeries ganttSeries)
-
getBarPlot
public JRBarPlot getBarPlot(JRBarPlot barPlot)
- Specified by:
getBarPlot
in classJRAbstractObjectFactory
-
getTimeSeries
public JRTimeSeries getTimeSeries(JRTimeSeries timeSeries)
- Specified by:
getTimeSeries
in classJRAbstractObjectFactory
-
getTimePeriodSeries
public JRTimePeriodSeries getTimePeriodSeries(JRTimePeriodSeries timePeriodSeries)
- Specified by:
getTimePeriodSeries
in classJRAbstractObjectFactory
-
getBar3DPlot
public JRBar3DPlot getBar3DPlot(JRBar3DPlot barPlot)
- Specified by:
getBar3DPlot
in classJRAbstractObjectFactory
-
getLinePlot
public JRLinePlot getLinePlot(JRLinePlot linePlot)
- Specified by:
getLinePlot
in classJRAbstractObjectFactory
-
getScatterPlot
public JRScatterPlot getScatterPlot(JRScatterPlot scatterPlot)
-
getAreaPlot
public JRAreaPlot getAreaPlot(JRAreaPlot areaPlot)
- Specified by:
getAreaPlot
in classJRAbstractObjectFactory
-
getBubblePlot
public JRBubblePlot getBubblePlot(JRBubblePlot bubblePlot)
- Specified by:
getBubblePlot
in classJRAbstractObjectFactory
-
getHighLowDataset
public JRHighLowDataset getHighLowDataset(JRHighLowDataset highLowDataset)
-
getHighLowPlot
public JRHighLowPlot getHighLowPlot(JRHighLowPlot highLowPlot)
-
getCandlestickPlot
public JRCandlestickPlot getCandlestickPlot(JRCandlestickPlot candlestickPlot)
- Specified by:
getCandlestickPlot
in classJRAbstractObjectFactory
-
getTimeSeriesPlot
public JRTimeSeriesPlot getTimeSeriesPlot(JRTimeSeriesPlot plot)
-
getValueDataset
public JRValueDataset getValueDataset(JRValueDataset valueDataset)
-
getMeterPlot
public JRMeterPlot getMeterPlot(JRMeterPlot meterPlot)
-
getThermometerPlot
public JRThermometerPlot getThermometerPlot(JRThermometerPlot thermometerPlot)
-
getMultiAxisPlot
public JRMultiAxisPlot getMultiAxisPlot(JRMultiAxisPlot multiAxisPlot)
-
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 java.util.List<JRFillElementDataset> getElementDatasetsList(java.lang.String datasetName)
-
trackDatasetRuns
public void trackDatasetRuns()
-
registerDatasetRun
public void registerDatasetRun(JRFillDatasetRun datasetRun)
-
getTrackedDatasetRuns
public java.util.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
-
getChartAxis
public JRChartAxis getChartAxis(JRChartAxis axis)
-
getReportTemplate
public JRFillReportTemplate getReportTemplate(JRReportTemplate template)
-
collectRequestedStyles
protected java.util.Set<JRStyle> collectRequestedStyles(java.util.List<JRStyle> externalStyles)
-
collectUsedStyles
protected void collectUsedStyles(JRStyle style, java.util.Map<JRStyle,java.lang.Object> usedStylesMap, java.util.Map<java.lang.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)
-
-