Package net.sf.jasperreports.engine.fill
Class JRFillElement
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRFillElement
-
- All Implemented Interfaces:
java.lang.Cloneable,DynamicPropertiesHolder,JRFillCloneable,JRChild,JRCloneable,JRCommonElement,JRElement,JRIdentifiable,JRPropertiesHolder,JRStyleContainer,JRStyleSetter,JRVisitable
- Direct Known Subclasses:
JRFillBreak,JRFillChart,JRFillComponentElement,JRFillCrosstab,JRFillFrame,JRFillGenericElement,JRFillGraphicElement,JRFillSubreport,JRFillTextElement
public abstract class JRFillElement extends java.lang.Object implements JRElement, JRFillCloneable, JRStyleSetter, DynamicPropertiesHolder
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRFillElement(JRBaseFiller filler, JRElement element, JRFillObjectFactory factory)private JRElement topElementInGroup; private JRElement bottomElementInGroup; /**protectedJRFillElement(JRFillElement element, JRFillCloneFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void_moveDependantElements()Deprecated.To be removed.protected void_stretchElement(int bandStretch)Deprecated.To be removed.protected void_stretchElementToHeight(int stretchHeight)Deprecated.To be removed.protected voidaddDependantElement(JRFillElement element)protected voidaddDynamicProperty(java.lang.String name, JRExpression expression)java.lang.Objectclone()java.lang.Objectclone(JRElementGroup parentGroup)JRElementclone(JRElementGroup parentGroup, int y)protected voidcollectDelayedEvaluations()protected voidcollectDelayedEvaluations(JRExpression expression)protected voidcollectDelayedEvaluations(JRStyle style)protected voidcollectStyleDelayedEvaluations()protected voidcollectStyleProviderDelayedEvaluations()protected abstract JRTemplateElementcreateElementTemplate()protected voiddelayedEvaluate(JRRecordedValuesPrintElement printElement, JREvaluationTime evaluationTime, byte evaluation)protected booleandelayedEvaluationUpdatesTemplate()protected abstract voidevaluate(byte evaluation)java.lang.ObjectevaluateExpression(JRExpression expression, byte evaluation)Evaluates an expression.protected voidevaluatePrintWhenExpression(byte evaluation)protected voidevaluateProperties(byte evaluation)protected voidevaluateStyle(byte evaluation)protected abstract JRPrintElementfill()java.awt.ColorgetBackcolor()protected JRFillBandgetBand()static java.lang.IntegergetBookmarkLevel(java.lang.Object value)protected intgetCollapsedHeightAbove()protected intgetCollapsedHeightBelow()JRFillElementContainergetConditionalStylesContainer()JRDefaultStyleProvidergetDefaultStyleProvider()protected java.util.Collection<JRFillElement>getDependantElements()JRPropertiesMapgetDynamicProperties()JRElementGroupgetElementGroup()Indicates the logical group that the element belongs to.protected JROrigingetElementOrigin()protected JRTemplateElementgetElementTemplate()protected JRPropertiesMapgetEvaluatedProperties()protected EvaluationTimeEnumgetEvaluationTimeValue()protected JRFillFieldgetField(java.lang.String fieldName)JRBaseFillergetFiller()java.awt.ColorgetForecolor()protected JRElement[]getGroupElements()intgetHeight()protected JRStylegetInitStyle()java.lang.StringgetKey()Returns the string value that uniquely identifies the element.ModeEnumgetModeValue()Returns the element transparency mode.java.awt.ColorgetOwnBackcolor()java.awt.ColorgetOwnForecolor()ModeEnumgetOwnModeValue()protected JRElementgetParent()JRPropertiesHoldergetParentProperties()Returns the parent properties holder, whose properties are used as defaults for this object.PositionTypeEnumgetPositionTypeValue()Returns the position type for the elementintgetPrepareHeight()JRExpressiongetPrintWhenExpression()Gets the expression that is evaluated in order to decide if the element should be displayed.JRGroupgetPrintWhenGroupChanges()Returns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.JRPropertiesMapgetPropertiesMap()Returns this object's properties map.JRPropertyExpression[]getPropertyExpressions()Returns the list of dynamic/expression-based properties for this report element.protected intgetRelativeY()intgetStretchHeight()StretchTypeEnumgetStretchTypeValue()Indicates the stretch type for the elementJRStylegetStyle()Returns this object's style.JRExpressiongetStyleExpression()Gets the expression that is evaluated in order to obtain the runtime style name to be used for the element.java.lang.StringgetStyleNameReference()Returns the name of an external style which is to be used by this object.protected StyleResolvergetStyleResolver()protected JRTemplateElementgetTemplate(JRStyle style)protected java.util.TimeZonegetTimeZone()java.util.UUIDgetUUID()protected JRFillVariablegetVariable(java.lang.String variableName)intgetWidth()intgetX()Gets the the section relative horizontal offset of the element top left corner.intgetY()Gets the the section relative vertical offset of the element top left corner.booleanhasDynamicProperties()booleanhasDynamicProperty(java.lang.String name)booleanhasProperties()Checks whether the object has any properties.protected voidinitDelayedEvaluationPrint(JRRecordedValuesPrintElement printElement)protected voidinitDelayedEvaluations()protected voidinitStyleProviders()booleanisAlreadyPrinted()protected booleanisAutoEvaluateNow()protected booleanisDelayedStyleEvaluation()protected booleanisEvaluateAuto()protected booleanisEvaluateNow()booleanisPrintInFirstWholeBand()Returns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column.booleanisPrintRepeatedValues()Specifies if the element value will be printed for every iteration, even if its value has not changed.booleanisPrintWhenDetailOverflows()If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page.protected booleanisPrintWhenExpressionNull()protected booleanisPrintWhenTrue()booleanisRemoveLineWhenBlank()Returns true if the remaining blank space appearing when the value is not printed will be removed.protected booleanisReprinted()booleanisToPrint()protected booleanisValueRepeating()Decides whether the value for this element is repeating.protected voidmoveDependantElements()protected voidperformDelayedEvaluation(JRPrintElement element, byte evaluation)protected booleanprepare(int availableHeight, boolean isOverflow)protected voidregisterTemplate(JRStyle style, JRTemplateElement template)protected voidreset()protected abstract voidresolveElement(JRPrintElement element, byte evaluation)Resolves an element.protected voidresolveElement(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime)Resolves an element.protected abstract voidrewind()voidsetAlreadyPrinted(boolean isAlreadyPrinted)voidsetBackcolor(java.awt.Color backcolor)protected voidsetBand(JRFillBand band)protected voidsetCollapsedHeightAbove(int collapsedHeightAbove)protected voidsetCollapsedHeightBelow(int collapsedHeightBelow)voidsetConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer)protected voidsetCurrentEvaluation(byte evaluation)protected voidsetExpressionEvaluator(JRFillExpressionEvaluator expressionEvaluator)voidsetForecolor(java.awt.Color forecolor)voidsetHeight(int height)voidsetMode(ModeEnum modeValue)Sets the element transparency mode.protected voidsetOriginProvider(JROriginProvider originProvider)voidsetPositionType(PositionTypeEnum positionType)Sets the position type for the element.protected voidsetPrepareHeight(int prepareHeight)Element height is calculated in two phases.voidsetPrintInFirstWholeBand(boolean isPrint)Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.voidsetPrintRepeatedValues(boolean isPrintRepeatedValues)voidsetPrintWhenDetailOverflows(boolean isPrint)If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page.protected voidsetPrintWhenExpressionNull(boolean isPrintWhenExpressionNull)protected voidsetPrintWhenTrue(boolean isPrintWhenTrue)protected voidsetRelativeY(int relativeY)voidsetRemoveLineWhenBlank(boolean isRemoveLine)Specifies whether the remaining blank space appearing when the value is not printed will be removed.protected voidsetReprinted(boolean isReprinted)protected voidsetShrinkable(boolean shrinkable)Indicates whether an element is shrinkable.protected voidsetStretchHeight(int stretchHeight)voidsetStretchType(StretchTypeEnum stretchType)Specifies how the engine should treat a missing image.voidsetStyle(JRStyle style)Set the style on the object.voidsetStyleNameReference(java.lang.String name)Set the name of an external style that is to be used by the object.protected voidsetToPrint(boolean isToPrint)protected voidsetValueRepeating(boolean isValueRepeating)Sets the repeating flag for this element.voidsetWidth(int width)voidsetX(int x)Sets the the section relative horizontal offset of the element top left corner.voidsetY(int y)protected booleanstretchElement(int containerStretch)protected booleanstretchElementToContainer(int containerStretch)protected booleanstretchElementToElementGroup()protected booleanstretchElementToHeight(int stretchHeight)This method returns a boolean signaling if any stretch change occurred.protected voidstretchHeightFinal()Deprecated.To be removed.protected booleantoPopulateTemplateStyle()protected voidtransferProperties(JRTemplateElement template)protected voidtransferProperties(JRPrintElement element)-
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.JRElement
collectExpressions
-
Methods inherited from interface net.sf.jasperreports.engine.fill.JRFillCloneable
createClone
-
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_INVALID_BOOKMARK_LEVEL
public static final java.lang.String EXCEPTION_MESSAGE_KEY_INVALID_BOOKMARK_LEVEL
- See Also:
- Constant Field Values
-
parent
protected JRElement parent
-
propertyExpressions
protected java.util.List<JRPropertyExpression> propertyExpressions
-
dynamicTransferProperties
protected java.util.List<java.lang.String> dynamicTransferProperties
-
providerStyle
protected JRStyle providerStyle
-
templates
protected java.util.Map<JRStyle,JRTemplateElement> templates
-
styleProviders
protected java.util.List<StyleProvider> styleProviders
-
filler
protected JRBaseFiller filler
-
expressionEvaluator
protected JRFillExpressionEvaluator expressionEvaluator
-
defaultStyleProvider
protected JRDefaultStyleProvider defaultStyleProvider
-
printWhenGroupChanges
protected JRGroup printWhenGroupChanges
-
elementGroup
protected JRFillElementGroup elementGroup
-
band
protected JRFillBand band
-
originProvider
protected JROriginProvider originProvider
-
printElementOriginator
protected PrintElementOriginator printElementOriginator
-
currentEvaluation
protected byte currentEvaluation
-
delayedEvaluationsMap
protected java.util.Map<JREvaluationTime,net.sf.jasperreports.engine.fill.JRFillElement.DelayedEvaluations> delayedEvaluationsMap
-
conditionalStylesContainer
protected JRFillElementContainer conditionalStylesContainer
-
fillContainerContext
protected FillContainerContext fillContainerContext
-
initStyle
protected JRStyle initStyle
-
exprStyle
protected JRStyle exprStyle
-
currentStyle
protected JRStyle currentStyle
-
staticProperties
protected JRPropertiesMap staticProperties
-
staticTransferProperties
protected JRPropertiesMap staticTransferProperties
-
dynamicProperties
protected JRPropertiesMap dynamicProperties
-
mergedProperties
protected JRPropertiesMap mergedProperties
-
hasDynamicPopulateTemplateStyle
protected boolean hasDynamicPopulateTemplateStyle
-
defaultPopulateTemplateStyle
protected java.lang.Boolean defaultPopulateTemplateStyle
-
-
Constructor Detail
-
JRFillElement
protected JRFillElement(JRBaseFiller filler, JRElement element, JRFillObjectFactory factory)
private JRElement topElementInGroup; private JRElement bottomElementInGroup; /**
-
JRFillElement
protected JRFillElement(JRFillElement element, JRFillCloneFactory factory)
-
-
Method Detail
-
getDefaultStyleProvider
public JRDefaultStyleProvider getDefaultStyleProvider()
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getUUID
public java.util.UUID getUUID()
- Specified by:
getUUIDin interfaceJRIdentifiable
-
getKey
public java.lang.String getKey()
Description copied from interface:JRElementReturns the string value that uniquely identifies the element.- Specified by:
getKeyin interfaceJRCommonElement- Specified by:
getKeyin interfaceJRElement
-
getPositionTypeValue
public PositionTypeEnum getPositionTypeValue()
Description copied from interface:JRElementReturns the position type for the element- Specified by:
getPositionTypeValuein interfaceJRElement- Returns:
- the position type
-
setPositionType
public void setPositionType(PositionTypeEnum positionType)
Description copied from interface:JRElementSets the position type for the element.- Specified by:
setPositionTypein interfaceJRElement- Parameters:
positionType- the position type
-
getStretchTypeValue
public StretchTypeEnum getStretchTypeValue()
Description copied from interface:JRElementIndicates the stretch type for the element- Specified by:
getStretchTypeValuein interfaceJRElement- Returns:
- a value representing one of the stretch type constants in
StretchTypeEnum
-
setStretchType
public void setStretchType(StretchTypeEnum stretchType)
Description copied from interface:JRElementSpecifies how the engine should treat a missing image.- Specified by:
setStretchTypein interfaceJRElement- Parameters:
stretchType- a value representing one of the stretch type constants inStretchTypeEnum
-
isPrintRepeatedValues
public boolean isPrintRepeatedValues()
Description copied from interface:JRElementSpecifies if the element value will be printed for every iteration, even if its value has not changed.- Specified by:
isPrintRepeatedValuesin interfaceJRElement- See Also:
JRElement.isRemoveLineWhenBlank(),JRElement.isPrintInFirstWholeBand()
-
setPrintRepeatedValues
public void setPrintRepeatedValues(boolean isPrintRepeatedValues)
- Specified by:
setPrintRepeatedValuesin interfaceJRElement
-
getModeValue
public ModeEnum getModeValue()
Description copied from interface:JRCommonElementReturns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getModeValuein interfaceJRCommonElement
-
getOwnModeValue
public ModeEnum getOwnModeValue()
- Specified by:
getOwnModeValuein interfaceJRCommonElement
-
setMode
public void setMode(ModeEnum modeValue)
Description copied from interface:JRCommonElementSets the element transparency mode.- Specified by:
setModein interfaceJRCommonElement
-
getX
public int getX()
Description copied from interface:JRElementGets the the section relative horizontal offset of the element top left corner.
-
setX
public void setX(int x)
Description copied from interface:JRElementSets the the section relative horizontal offset of the element top left corner.
-
setY
public void setY(int y)
-
getY
public int getY()
Description copied from interface:JRElementGets the the section relative vertical offset of the element top left corner.
-
getWidth
public int getWidth()
- Specified by:
getWidthin interfaceJRCommonElement
-
setHeight
public void setHeight(int height)
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfaceJRCommonElement
-
isRemoveLineWhenBlank
public boolean isRemoveLineWhenBlank()
Description copied from interface:JRElementReturns true if the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If this method returns true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.- Specified by:
isRemoveLineWhenBlankin interfaceJRElement
-
setRemoveLineWhenBlank
public void setRemoveLineWhenBlank(boolean isRemoveLine)
Description copied from interface:JRElementSpecifies whether the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If the parameter is set to true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.- Specified by:
setRemoveLineWhenBlankin interfaceJRElement
-
isPrintInFirstWholeBand
public boolean isPrintInFirstWholeBand()
Description copied from interface:JRElementReturns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column.- Specified by:
isPrintInFirstWholeBandin interfaceJRElement- See Also:
JRElement.isPrintRepeatedValues()
-
setPrintInFirstWholeBand
public void setPrintInFirstWholeBand(boolean isPrint)
Description copied from interface:JRElementSpecifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.- Specified by:
setPrintInFirstWholeBandin interfaceJRElement- See Also:
JRElement.isPrintRepeatedValues()
-
isPrintWhenDetailOverflows
public boolean isPrintWhenDetailOverflows()
Description copied from interface:JRElementIf this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.- Specified by:
isPrintWhenDetailOverflowsin interfaceJRElement
-
setPrintWhenDetailOverflows
public void setPrintWhenDetailOverflows(boolean isPrint)
Description copied from interface:JRElementIf this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.- Specified by:
setPrintWhenDetailOverflowsin interfaceJRElement
-
getForecolor
public java.awt.Color getForecolor()
- Specified by:
getForecolorin interfaceJRCommonElement
-
getOwnForecolor
public java.awt.Color getOwnForecolor()
- Specified by:
getOwnForecolorin interfaceJRCommonElement
-
setForecolor
public void setForecolor(java.awt.Color forecolor)
- Specified by:
setForecolorin interfaceJRCommonElement
-
getBackcolor
public java.awt.Color getBackcolor()
- Specified by:
getBackcolorin interfaceJRCommonElement
-
getOwnBackcolor
public java.awt.Color getOwnBackcolor()
- Specified by:
getOwnBackcolorin interfaceJRCommonElement
-
setBackcolor
public void setBackcolor(java.awt.Color backcolor)
- Specified by:
setBackcolorin interfaceJRCommonElement
-
getStyleExpression
public JRExpression getStyleExpression()
Description copied from interface:JRElementGets the expression that is evaluated in order to obtain the runtime style name to be used for the element. When used, this expression takes precedence over theJRStyleContainer.getStyle()orJRStyleContainer.getStyleNameReference().- Specified by:
getStyleExpressionin interfaceJRElement
-
getPrintWhenExpression
public JRExpression getPrintWhenExpression()
Description copied from interface:JRElementGets the expression that is evaluated in order to decide if the element should be displayed. This expression always returns a boolean value.- Specified by:
getPrintWhenExpressionin interfaceJRElement
-
getPrintWhenGroupChanges
public JRGroup getPrintWhenGroupChanges()
Description copied from interface:JRElementReturns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.- Specified by:
getPrintWhenGroupChangesin interfaceJRElement- See Also:
JRElement.isPrintRepeatedValues()
-
getElementGroup
public JRElementGroup getElementGroup()
Description copied from interface:JRElementIndicates the logical group that the element belongs to. More elements can be grouped in order to make some of them stretch relative to the height of their parent group.- Specified by:
getElementGroupin interfaceJRElement- See Also:
StretchTypeEnum
-
isPrintWhenExpressionNull
protected boolean isPrintWhenExpressionNull()
-
setPrintWhenExpressionNull
protected void setPrintWhenExpressionNull(boolean isPrintWhenExpressionNull)
-
isPrintWhenTrue
protected boolean isPrintWhenTrue()
-
setPrintWhenTrue
protected void setPrintWhenTrue(boolean isPrintWhenTrue)
-
isToPrint
public boolean isToPrint()
-
setToPrint
protected void setToPrint(boolean isToPrint)
-
isReprinted
protected boolean isReprinted()
-
setReprinted
protected void setReprinted(boolean isReprinted)
-
isAlreadyPrinted
public boolean isAlreadyPrinted()
-
setAlreadyPrinted
public void setAlreadyPrinted(boolean isAlreadyPrinted)
-
getGroupElements
protected JRElement[] getGroupElements()
-
getDependantElements
protected java.util.Collection<JRFillElement> getDependantElements()
-
addDependantElement
protected void addDependantElement(JRFillElement element)
-
getRelativeY
protected int getRelativeY()
-
setRelativeY
protected void setRelativeY(int relativeY)
-
getCollapsedHeightAbove
protected int getCollapsedHeightAbove()
-
setCollapsedHeightAbove
protected void setCollapsedHeightAbove(int collapsedHeightAbove)
-
getCollapsedHeightBelow
protected int getCollapsedHeightBelow()
-
setCollapsedHeightBelow
protected void setCollapsedHeightBelow(int collapsedHeightBelow)
-
getStretchHeight
public int getStretchHeight()
-
setStretchHeight
protected void setStretchHeight(int stretchHeight)
-
getPrepareHeight
public int getPrepareHeight()
-
setPrepareHeight
protected void setPrepareHeight(int prepareHeight)
Element height is calculated in two phases. First, the element stretches on its own during prepare, to accommodate all its content. This is the natural stretch and we keep track of the calculated height in prepareHeight. Secondly, the element stretches further in accordance with its stretchType property. This forced stretch occurs at a later time and the amount of stretch is kept in stretchHeight.
-
getBand
protected JRFillBand getBand()
-
setBand
protected void setBand(JRFillBand band)
-
initStyleProviders
protected void initStyleProviders()
-
reset
protected void reset()
-
setCurrentEvaluation
protected void setCurrentEvaluation(byte evaluation)
-
evaluate
protected abstract void evaluate(byte evaluation) throws JRException- Throws:
JRException
-
evaluateStyle
protected void evaluateStyle(byte evaluation) throws JRException- Throws:
JRException
-
getTimeZone
protected java.util.TimeZone getTimeZone()
-
evaluatePrintWhenExpression
protected void evaluatePrintWhenExpression(byte evaluation) throws JRException- Throws:
JRException
-
rewind
protected abstract void rewind() throws JRException- Throws:
JRException
-
fill
protected abstract JRPrintElement fill() throws JRException
- Throws:
JRException
-
getElementTemplate
protected JRTemplateElement getElementTemplate()
-
createElementTemplate
protected abstract JRTemplateElement createElementTemplate()
-
toPopulateTemplateStyle
protected boolean toPopulateTemplateStyle()
-
prepare
protected boolean prepare(int availableHeight, boolean isOverflow) throws JRException- Throws:
JRException
-
_stretchElement
protected void _stretchElement(int bandStretch)
Deprecated.To be removed.
-
_stretchElementToHeight
protected void _stretchElementToHeight(int stretchHeight)
Deprecated.To be removed.
-
stretchElement
protected boolean stretchElement(int containerStretch)
-
stretchElementToContainer
protected boolean stretchElementToContainer(int containerStretch)
-
stretchElementToElementGroup
protected boolean stretchElementToElementGroup()
-
stretchElementToHeight
protected boolean stretchElementToHeight(int stretchHeight)
This method returns a boolean signaling if any stretch change occurred. It does not say which amount of stretch was applied, but that is OK, because the only place where this is checked is during frame cascading stretch, where the stretchHeight field of the frame (set here) is used directly.
-
_moveDependantElements
protected void _moveDependantElements()
Deprecated.To be removed.
-
moveDependantElements
protected void moveDependantElements()
-
resolveElement
protected abstract void resolveElement(JRPrintElement element, byte evaluation) throws JRException
Resolves an element.- Parameters:
element- the elementevaluation- the evaluation type- Throws:
JRException
-
performDelayedEvaluation
protected void performDelayedEvaluation(JRPrintElement element, byte evaluation) throws JRException
- Throws:
JRException
-
delayedEvaluationUpdatesTemplate
protected boolean delayedEvaluationUpdatesTemplate()
-
evaluateExpression
public final java.lang.Object evaluateExpression(JRExpression expression, byte evaluation) throws JRException
Evaluates an expression.- Parameters:
expression- the expressionevaluation- the evaluation type- Returns:
- the evaluation result
- Throws:
JRException
-
isValueRepeating
protected boolean isValueRepeating()
Decides whether the value for this element is repeating.Dynamic elements should call
setValueRepeating(boolean)onevaluate(byte). Static elements don't have to do anything, this method will returntrueby default.- Returns:
- whether the value for this element is repeating
- See Also:
setValueRepeating(boolean)
-
setValueRepeating
protected void setValueRepeating(boolean isValueRepeating)
Sets the repeating flag for this element.This method should be called by dynamic elements on
evaluate(byte).- Parameters:
isValueRepeating- whether the value of the element is repeating- See Also:
isValueRepeating()
-
getVariable
protected JRFillVariable getVariable(java.lang.String variableName)
-
getField
protected JRFillField getField(java.lang.String fieldName)
-
getEvaluationTimeValue
protected EvaluationTimeEnum getEvaluationTimeValue()
-
resolveElement
protected void resolveElement(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime) throws JRException
Resolves an element.- Parameters:
element- the elementevaluation- the evaluation typeevaluationTime- the current evaluation time- Throws:
JRException
-
initDelayedEvaluations
protected void initDelayedEvaluations()
-
collectDelayedEvaluations
protected void collectDelayedEvaluations()
-
collectStyleDelayedEvaluations
protected void collectStyleDelayedEvaluations()
-
collectDelayedEvaluations
protected void collectDelayedEvaluations(JRStyle style)
-
collectDelayedEvaluations
protected void collectDelayedEvaluations(JRExpression expression)
-
collectStyleProviderDelayedEvaluations
protected void collectStyleProviderDelayedEvaluations()
-
initDelayedEvaluationPrint
protected void initDelayedEvaluationPrint(JRRecordedValuesPrintElement printElement) throws JRException
- Throws:
JRException
-
delayedEvaluate
protected void delayedEvaluate(JRRecordedValuesPrintElement printElement, JREvaluationTime evaluationTime, byte evaluation) throws JRException
- Throws:
JRException
-
setConditionalStylesContainer
public void setConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer)
-
getConditionalStylesContainer
public JRFillElementContainer getConditionalStylesContainer()
-
getStyle
public JRStyle getStyle()
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
getTemplate
protected JRTemplateElement getTemplate(JRStyle style)
-
registerTemplate
protected void registerTemplate(JRStyle style, JRTemplateElement template)
-
setShrinkable
protected final void setShrinkable(boolean shrinkable)
Indicates whether an element is shrinkable.This flag is only effective when
isRemoveLineWhenBlankis also set.- Parameters:
shrinkable- whether the element is shrinkable
-
stretchHeightFinal
protected void stretchHeightFinal()
Deprecated.To be removed.Called when the stretch height of an element is final so that the element can perform any adjustments.
-
isEvaluateNow
protected boolean isEvaluateNow()
-
isAutoEvaluateNow
protected boolean isAutoEvaluateNow()
-
isEvaluateAuto
protected boolean isEvaluateAuto()
-
getStyleNameReference
public java.lang.String getStyleNameReference()
Description copied from interface:JRStyleContainerReturns the name of an external style which is to be used by this object. External styles are defined intemplatesand are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()is specified for this object.- Specified by:
getStyleNameReferencein interfaceJRStyleContainer- Returns:
- the name of an external style
-
setStyle
public void setStyle(JRStyle style)
Description copied from interface:JRStyleSetterSet the style on the object. In some cases, this method is invoked after the object has requested its style to be set.- Specified by:
setStylein interfaceJRStyleSetter- Parameters:
style- the style to be used by the object
-
setStyleNameReference
public void setStyleNameReference(java.lang.String name)
Description copied from interface:JRStyleSetterSet the name of an external style that is to be used by the object.- Specified by:
setStyleNameReferencein interfaceJRStyleSetter- Parameters:
name- the name of an external style
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
clone
public java.lang.Object clone(JRElementGroup parentGroup)
-
clone
public JRElement clone(JRElementGroup parentGroup, int y)
-
hasProperties
public boolean hasProperties()
Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Returns:
- whether the object has any properties
-
getPropertiesMap
public JRPropertiesMap getPropertiesMap()
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
getParentProperties
public JRPropertiesHolder getParentProperties()
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Returns:
- the parent properties holder, or
nullif no parent
-
getPropertyExpressions
public JRPropertyExpression[] getPropertyExpressions()
Description copied from interface:JRElementReturns the list of dynamic/expression-based properties for this report element.- Specified by:
getPropertyExpressionsin interfaceJRElement- Returns:
- an array containing the expression-based properties of this report element
-
transferProperties
protected void transferProperties(JRTemplateElement template)
-
transferProperties
protected void transferProperties(JRPrintElement element)
-
getEvaluatedProperties
protected JRPropertiesMap getEvaluatedProperties()
-
evaluateProperties
protected void evaluateProperties(byte evaluation) throws JRException- Throws:
JRException
-
setOriginProvider
protected void setOriginProvider(JROriginProvider originProvider)
-
getElementOrigin
protected JROrigin getElementOrigin()
-
isDelayedStyleEvaluation
protected boolean isDelayedStyleEvaluation()
-
getFiller
public JRBaseFiller getFiller()
-
hasDynamicProperties
public boolean hasDynamicProperties()
- Specified by:
hasDynamicPropertiesin interfaceDynamicPropertiesHolder
-
hasDynamicProperty
public boolean hasDynamicProperty(java.lang.String name)
- Specified by:
hasDynamicPropertyin interfaceDynamicPropertiesHolder
-
getDynamicProperties
public JRPropertiesMap getDynamicProperties()
- Specified by:
getDynamicPropertiesin interfaceDynamicPropertiesHolder
-
getInitStyle
protected JRStyle getInitStyle()
-
getParent
protected JRElement getParent()
-
addDynamicProperty
protected void addDynamicProperty(java.lang.String name, JRExpression expression)
-
setExpressionEvaluator
protected void setExpressionEvaluator(JRFillExpressionEvaluator expressionEvaluator)
-
getBookmarkLevel
public static java.lang.Integer getBookmarkLevel(java.lang.Object value) throws JRException- Throws:
JRException
-
-