Package net.sf.jasperreports.engine.fill
Class JRFillComponentElement
java.lang.Object
net.sf.jasperreports.engine.fill.JRFillElement
net.sf.jasperreports.engine.fill.JRFillComponentElement
- All Implemented Interfaces:
Cloneable
,FillContext
,DynamicPropertiesHolder
,JRFillCloneable
,JRFillExpressionEvaluator
,JRChild
,JRCloneable
,JRCommonElement
,JRComponentElement
,JRElement
,JRIdentifiable
,JRPropertiesHolder
,JRStyleContainer
,JRStyleSetter
,JRVisitable
public class JRFillComponentElement
extends JRFillElement
implements JRComponentElement, FillContext
A
JRComponentElement
which is used during report fill.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElement
band, conditionalStylesContainer, currentEvaluation, currentStyle, defaultPopulateTemplateStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, dynamicTransferProperties, elementGroup, EXCEPTION_MESSAGE_KEY_INVALID_BOOKMARK_LEVEL, expressionEvaluator, exprStyle, fillContainerContext, filler, hasDynamicPopulateTemplateStyle, initStyle, mergedProperties, originProvider, parent, printElementOriginator, printWhenGroupChanges, propertyExpressions, providerStyle, staticProperties, staticTransferProperties, styleProviders, templates
Fields inherited from interface net.sf.jasperreports.engine.JRComponentElement
PROPERTY_COMPONENT_NAME
Fields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
-
Constructor Summary
ConstructorsConstructorDescriptionJRFillComponentElement
(JRBaseFiller filler, JRComponentElement element, JRFillObjectFactory factory) JRFillComponentElement
(JRFillComponentElement element, JRFillCloneFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
collectExpressions
(JRExpressionCollector collector) createClone
(JRFillCloneFactory factory) Creates a working clone of itself.protected JRTemplateElement
protected void
evaluate
(byte evaluation) evaluate
(JRExpression expression, byte evaluation) Evaluates an expression in the main report dataset.protected JRPrintElement
fill()
Returns the component instance wrapped by this element.Returns the component element that wraps the component.Returns the origin of the current component element.int
Returns the position on the vertical axis where the component element starts printing.int
Returns the fill element Id associated to the component element.Returns the current style of the component element.Returns the dataset used by the expression evaluator.Returns the filler object.Returns a generator for print Ids for the component element.Returns the locale used to fill the current report.Returns the resource bundle used for the current report.Returns the time zone used to fill the current report.protected boolean
prepare
(int availableHeight, boolean isOverflow, boolean isOverflowAllowed) void
registerDelayedEvaluation
(JRPrintElement printElement, EvaluationTimeEnum evaluationTime, String evaluationGroup) Registers a delayed evaluation for a print element.protected void
resolveElement
(JRPrintElement element, byte evaluation) Resolves an element.protected void
resolveElement
(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime) Resolves an element.protected void
rewind()
protected void
setBand
(JRFillBand band) void
setConditionalStylesContainer
(JRFillElementContainer conditionalStylesContainer) protected void
setStretchHeight
(int stretchHeight) void
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, addDynamicProperty, clone, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, collectStyleProviderDelayedEvaluations, delayedEvaluate, delayedEvaluationUpdatesTemplate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, evaluateStyle, getBackcolor, getBand, getBookmarkLevel, getCollapsedHeightAbove, getCollapsedHeightBelow, getConditionalStylesContainer, getDefaultStyleProvider, getDependantElements, getDynamicProperties, getElementGroup, getElementTemplate, getEvaluatedProperties, getEvaluationTime, getField, getForecolor, getGroupElements, getHeight, getInitStyle, getKey, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPositionType, getPrepareHeight, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getRelativeY, getStretchHeight, getStretchType, getStyle, getStyleExpression, getStyleNameReference, getStyleResolver, getTemplate, getTimeZone, getUUID, getVariable, getWidth, getX, getY, hasDynamicProperties, hasDynamicProperty, hasProperties, initDelayedEvaluationPrint, initDelayedEvaluations, initStyleProviders, isAlreadyPrinted, isAutoEvaluateNow, isDelayedStyleEvaluation, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, performDelayedEvaluation, registerTemplate, reset, setAlreadyPrinted, setBackcolor, setCollapsedHeightAbove, setCollapsedHeightBelow, setCurrentEvaluation, setExpressionEvaluator, setForecolor, setHeight, setMode, setOriginProvider, setPositionType, setPrepareHeight, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setWidth, setX, setY, stretchElement, stretchElementToContainer, stretchElementToElementGroup, stretchElementToHeight, toPopulateTemplateStyle, transferProperties, transferProperties
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.jasperreports.engine.component.FillContext
getDefaultStyleProvider
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setMode
Methods inherited from interface net.sf.jasperreports.engine.JRElement
clone, getElementGroup, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Constructor Details
-
JRFillComponentElement
public JRFillComponentElement(JRBaseFiller filler, JRComponentElement element, JRFillObjectFactory factory) -
JRFillComponentElement
-
-
Method Details
-
setBand
- Overrides:
setBand
in classJRFillElement
-
evaluate
- Specified by:
evaluate
in classJRFillElement
- Throws:
JRException
-
prepare
protected boolean prepare(int availableHeight, boolean isOverflow, boolean isOverflowAllowed) throws JRException - Overrides:
prepare
in classJRFillElement
- Throws:
JRException
-
setStretchHeight
protected void setStretchHeight(int stretchHeight) - Overrides:
setStretchHeight
in classJRFillElement
-
setConditionalStylesContainer
- Overrides:
setConditionalStylesContainer
in classJRFillElement
-
fill
- Specified by:
fill
in classJRFillElement
- Throws:
JRException
-
createElementTemplate
- Specified by:
createElementTemplate
in classJRFillElement
-
resolveElement
protected void resolveElement(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime) throws JRException Description copied from class:JRFillElement
Resolves an element.- Overrides:
resolveElement
in classJRFillElement
- Parameters:
element
- the elementevaluation
- the evaluation typeevaluationTime
- the current evaluation time- Throws:
JRException
-
resolveElement
Description copied from class:JRFillElement
Resolves an element.- Specified by:
resolveElement
in classJRFillElement
- Parameters:
element
- the elementevaluation
- the evaluation type- Throws:
JRException
-
rewind
- Specified by:
rewind
in classJRFillElement
- Throws:
JRException
-
collectExpressions
- Specified by:
collectExpressions
in interfaceJRElement
-
visit
- Specified by:
visit
in interfaceJRVisitable
-
createClone
Description copied from interface:JRFillCloneable
Creates a working clone of itself.- Specified by:
createClone
in interfaceJRFillCloneable
- Parameters:
factory
- the clone factory to use while creating the clone- Returns:
- a working clone of itself
-
getParent
- Overrides:
getParent
in classJRFillElement
-
getComponent
Description copied from interface:JRComponentElement
Returns the component instance wrapped by this element.- Specified by:
getComponent
in interfaceJRComponentElement
- Returns:
- the component instance
-
evaluate
Description copied from interface:FillContext
Evaluates an expression in the main report dataset.- Specified by:
evaluate
in interfaceFillContext
- Specified by:
evaluate
in interfaceJRFillExpressionEvaluator
- Parameters:
expression
- the expression to evaluateevaluation
- the evaluation type; usually directly passed fromFillComponent.evaluate(byte)
- Returns:
- the result of the evaluation
- Throws:
JRException
-
getFillDataset
Description copied from interface:JRFillExpressionEvaluator
Returns the dataset used by the expression evaluator.- Specified by:
getFillDataset
in interfaceJRFillExpressionEvaluator
-
getComponentElement
Description copied from interface:FillContext
Returns the component element that wraps the component.- Specified by:
getComponentElement
in interfaceFillContext
- Returns:
- the current component element
-
getElementSourceId
public int getElementSourceId()Description copied from interface:FillContext
Returns the fill element Id associated to the component element.- Specified by:
getElementSourceId
in interfaceFillContext
- Returns:
- the Id of the component fill element
- See Also:
-
getPrintElementOriginator
Description copied from interface:FillContext
Returns a generator for print Ids for the component element.- Specified by:
getPrintElementOriginator
in interfaceFillContext
- Returns:
- a generator for print Ids
- See Also:
-
getElementOrigin
Description copied from interface:FillContext
Returns the origin of the current component element.- Specified by:
getElementOrigin
in interfaceFillContext
- Overrides:
getElementOrigin
in classJRFillElement
- Returns:
- the origin of the component element
-
getElementPrintY
public int getElementPrintY()Description copied from interface:FillContext
Returns the position on the vertical axis where the component element starts printing.- Specified by:
getElementPrintY
in interfaceFillContext
- Returns:
- the position on the vertical axis of the component element
-
getElementStyle
Description copied from interface:FillContext
Returns the current style of the component element.- Specified by:
getElementStyle
in interfaceFillContext
- Returns:
- the current style of the component element
-
registerDelayedEvaluation
public void registerDelayedEvaluation(JRPrintElement printElement, EvaluationTimeEnum evaluationTime, String evaluationGroup) Description copied from interface:FillContext
Registers a delayed evaluation for a print element.- Specified by:
registerDelayedEvaluation
in interfaceFillContext
- Parameters:
printElement
- the print elementevaluationTime
- the delayed evaluation time; one ofevaluationGroup
- the evaluation group name, ifevaluationTime
isEvaluationTimeEnum.GROUP
- See Also:
-
getReportLocale
Description copied from interface:FillContext
Returns the locale used to fill the current report.- Specified by:
getReportLocale
in interfaceFillContext
- Returns:
- the report locale
- See Also:
-
getReportResourceBundle
Description copied from interface:FillContext
Returns the resource bundle used for the current report.- Specified by:
getReportResourceBundle
in interfaceFillContext
- Returns:
- the report resource bundle
- See Also:
-
getReportTimezone
Description copied from interface:FillContext
Returns the time zone used to fill the current report.- Specified by:
getReportTimezone
in interfaceFillContext
- Returns:
- the report time zone
- See Also:
-
getFiller
Description copied from interface:FillContext
Returns the filler object.- Specified by:
getFiller
in interfaceFillContext
- Overrides:
getFiller
in classJRFillElement
- Returns:
- the filler object
-
getFillContainerContext
- Specified by:
getFillContainerContext
in interfaceFillContext
-