public abstract class JRFillElement extends Object implements JRElement, JRFillCloneable, JRStyleSetter, DynamicPropertiesHolder
Modifier | Constructor and Description |
---|---|
protected |
JRFillElement(JRBaseFiller filler,
JRElement element,
JRFillObjectFactory factory)
private JRElement topElementInGroup;
private JRElement bottomElementInGroup;
/**
|
protected |
JRFillElement(JRFillElement element,
JRFillCloneFactory factory) |
Modifier and Type | Method and 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 void |
addDependantElement(JRFillElement element) |
protected void |
addDynamicProperty(String name,
JRExpression expression) |
Object |
clone() |
Object |
clone(JRElementGroup parentGroup) |
JRElement |
clone(JRElementGroup parentGroup,
int y) |
protected void |
collectDelayedEvaluations() |
protected void |
collectDelayedEvaluations(JRExpression expression) |
protected void |
collectDelayedEvaluations(JRStyle style) |
protected void |
collectStyleDelayedEvaluations() |
protected void |
collectStyleProviderDelayedEvaluations() |
protected abstract JRTemplateElement |
createElementTemplate() |
protected void |
delayedEvaluate(JRRecordedValuesPrintElement printElement,
JREvaluationTime evaluationTime,
byte evaluation) |
protected boolean |
delayedEvaluationUpdatesTemplate() |
protected abstract void |
evaluate(byte evaluation) |
Object |
evaluateExpression(JRExpression expression,
byte evaluation)
Evaluates an expression.
|
protected void |
evaluatePrintWhenExpression(byte evaluation) |
protected void |
evaluateProperties(byte evaluation) |
protected void |
evaluateStyle(byte evaluation) |
protected abstract JRPrintElement |
fill() |
Color |
getBackcolor() |
protected JRFillBand |
getBand() |
protected int |
getCollapsedHeightAbove() |
protected int |
getCollapsedHeightBelow() |
JRFillElementContainer |
getConditionalStylesContainer() |
JRDefaultStyleProvider |
getDefaultStyleProvider() |
protected Collection<JRFillElement> |
getDependantElements() |
JRPropertiesMap |
getDynamicProperties() |
JRElementGroup |
getElementGroup()
Indicates the logical group that the element belongs to.
|
protected JROrigin |
getElementOrigin() |
protected JRTemplateElement |
getElementTemplate() |
protected JRPropertiesMap |
getEvaluatedProperties() |
protected EvaluationTimeEnum |
getEvaluationTimeValue() |
protected JRFillField |
getField(String fieldName) |
JRBaseFiller |
getFiller() |
Color |
getForecolor() |
protected JRElement[] |
getGroupElements() |
int |
getHeight() |
protected JRStyle |
getInitStyle() |
String |
getKey()
Returns the string value that uniquely identifies the element.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
Color |
getOwnBackcolor() |
Color |
getOwnForecolor() |
ModeEnum |
getOwnModeValue() |
protected JRElement |
getParent() |
JRPropertiesHolder |
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults
for this object.
|
PositionTypeEnum |
getPositionTypeValue()
Returns the position type for the element
|
int |
getPrepareHeight() |
JRExpression |
getPrintWhenExpression()
Gets the expression that is evaluated in order to decide if the element should be displayed.
|
JRGroup |
getPrintWhenGroupChanges()
Returns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed
even if the value has not changed.
|
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map.
|
JRPropertyExpression[] |
getPropertyExpressions()
Returns the list of dynamic/expression-based properties for this report element.
|
protected int |
getRelativeY() |
int |
getStretchHeight() |
StretchTypeEnum |
getStretchTypeValue()
Indicates the stretch type for the element
|
JRStyle |
getStyle()
Returns this object's style.
|
String |
getStyleNameReference()
Returns the name of an external style which is to be used by this object.
|
protected StyleResolver |
getStyleResolver() |
protected JRTemplateElement |
getTemplate(JRStyle style) |
UUID |
getUUID() |
protected JRFillVariable |
getVariable(String variableName) |
int |
getWidth() |
int |
getX()
Gets the the section relative horizontal offset of the element top left corner.
|
int |
getY()
Gets the the section relative vertical offset of the element top left corner.
|
boolean |
hasDynamicProperties() |
boolean |
hasDynamicProperty(String name) |
boolean |
hasProperties()
Checks whether the object has any properties.
|
protected void |
initDelayedEvaluationPrint(JRRecordedValuesPrintElement printElement) |
protected void |
initDelayedEvaluations() |
protected void |
initStyleProviders() |
boolean |
isAlreadyPrinted() |
protected boolean |
isAutoEvaluateNow() |
protected boolean |
isDelayedStyleEvaluation() |
protected boolean |
isEvaluateAuto() |
protected boolean |
isEvaluateNow() |
boolean |
isPrintInFirstWholeBand()
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.
|
boolean |
isPrintRepeatedValues()
Specifies if the element value will be printed for every iteration, even if its value has not changed.
|
boolean |
isPrintWhenDetailOverflows()
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 boolean |
isPrintWhenExpressionNull() |
protected boolean |
isPrintWhenTrue() |
boolean |
isRemoveLineWhenBlank()
Returns true if the remaining blank space appearing when the value is not printed will be removed.
|
protected boolean |
isReprinted() |
boolean |
isToPrint() |
protected boolean |
isValueRepeating()
Decides whether the value for this element is repeating.
|
protected void |
moveDependantElements() |
protected void |
performDelayedEvaluation(JRPrintElement element,
byte evaluation) |
protected boolean |
prepare(int availableHeight,
boolean isOverflow) |
protected void |
registerTemplate(JRStyle style,
JRTemplateElement template) |
protected void |
reset() |
protected abstract void |
resolveElement(JRPrintElement element,
byte evaluation)
Resolves an element.
|
protected void |
resolveElement(JRPrintElement element,
byte evaluation,
JREvaluationTime evaluationTime)
Resolves an element.
|
protected abstract void |
rewind() |
void |
setAlreadyPrinted(boolean isAlreadyPrinted) |
void |
setBackcolor(Color backcolor) |
protected void |
setBand(JRFillBand band) |
protected void |
setCollapsedHeightAbove(int collapsedHeightAbove) |
protected void |
setCollapsedHeightBelow(int collapsedHeightBelow) |
void |
setConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer) |
protected void |
setCurrentEvaluation(byte evaluation) |
protected void |
setExpressionEvaluator(JRFillExpressionEvaluator expressionEvaluator) |
void |
setForecolor(Color forecolor) |
void |
setHeight(int height) |
void |
setMode(ModeEnum modeValue)
Sets the element transparency mode.
|
protected void |
setOriginProvider(JROriginProvider originProvider) |
void |
setPositionType(PositionTypeEnum positionType)
Sets the position type for the element.
|
protected void |
setPrepareHeight(int prepareHeight)
Element height is calculated in two phases.
|
void |
setPrintInFirstWholeBand(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.
|
void |
setPrintRepeatedValues(boolean isPrintRepeatedValues) |
void |
setPrintWhenDetailOverflows(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 void |
setPrintWhenExpressionNull(boolean isPrintWhenExpressionNull) |
protected void |
setPrintWhenTrue(boolean isPrintWhenTrue) |
protected void |
setRelativeY(int relativeY) |
void |
setRemoveLineWhenBlank(boolean isRemoveLine)
Specifies whether the remaining blank space appearing when the value is not printed will be removed.
|
protected void |
setReprinted(boolean isReprinted) |
protected void |
setShrinkable(boolean shrinkable)
Indicates whether an element is shrinkable.
|
protected void |
setStretchHeight(int stretchHeight) |
void |
setStretchType(StretchTypeEnum stretchType)
Specifies how the engine should treat a missing image.
|
void |
setStyle(JRStyle style)
Set the style on the object.
|
void |
setStyleNameReference(String name)
Set the name of an external style that is to be used by the object.
|
protected void |
setToPrint(boolean isToPrint) |
protected void |
setValueRepeating(boolean isValueRepeating)
Sets the repeating flag for this element.
|
void |
setWidth(int width) |
void |
setX(int x)
Sets the the section relative horizontal offset of the element top left corner.
|
void |
setY(int y) |
protected boolean |
stretchElement(int containerStretch) |
protected boolean |
stretchElementToContainer(int containerStretch) |
protected boolean |
stretchElementToElementGroup() |
protected boolean |
stretchElementToHeight(int stretchHeight)
This method returns a boolean signaling if any stretch change occurred.
|
protected void |
stretchHeightFinal()
Deprecated.
To be removed.
|
protected void |
transferProperties(JRPrintElement element) |
protected void |
transferProperties(JRTemplateElement template) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collectExpressions
visit
createClone
protected JRElement parent
protected List<JRPropertyExpression> propertyExpressions
protected JRStyle providerStyle
protected Map<JRStyle,JRTemplateElement> templates
protected List<StyleProvider> styleProviders
protected JRBaseFiller filler
protected JRFillExpressionEvaluator expressionEvaluator
protected JRDefaultStyleProvider defaultStyleProvider
protected JRGroup printWhenGroupChanges
protected JRFillElementGroup elementGroup
protected JRFillBand band
protected JROriginProvider originProvider
protected PrintElementOriginator printElementOriginator
protected byte currentEvaluation
protected Map<JREvaluationTime,net.sf.jasperreports.engine.fill.JRFillElement.DelayedEvaluations> delayedEvaluationsMap
protected JRFillElementContainer conditionalStylesContainer
protected FillContainerContext fillContainerContext
protected JRStyle initStyle
protected JRStyle currentStyle
protected JRPropertiesMap staticProperties
protected JRPropertiesMap dynamicProperties
protected JRPropertiesMap mergedProperties
protected JRFillElement(JRBaseFiller filler, JRElement element, JRFillObjectFactory factory)
protected JRFillElement(JRFillElement element, JRFillCloneFactory factory)
public JRDefaultStyleProvider getDefaultStyleProvider()
getDefaultStyleProvider
in interface JRStyleContainer
protected StyleResolver getStyleResolver()
public UUID getUUID()
getUUID
in interface JRIdentifiable
public String getKey()
JRElement
getKey
in interface JRCommonElement
getKey
in interface JRElement
public PositionTypeEnum getPositionTypeValue()
JRElement
getPositionTypeValue
in interface JRElement
public void setPositionType(PositionTypeEnum positionType)
JRElement
setPositionType
in interface JRElement
positionType
- the position typepublic StretchTypeEnum getStretchTypeValue()
JRElement
getStretchTypeValue
in interface JRElement
StretchTypeEnum
public void setStretchType(StretchTypeEnum stretchType)
JRElement
setStretchType
in interface JRElement
stretchType
- a value representing one of the stretch type constants in StretchTypeEnum
public boolean isPrintRepeatedValues()
JRElement
isPrintRepeatedValues
in interface JRElement
JRElement.isRemoveLineWhenBlank()
,
JRElement.isPrintInFirstWholeBand()
public void setPrintRepeatedValues(boolean isPrintRepeatedValues)
setPrintRepeatedValues
in interface JRElement
public ModeEnum getModeValue()
JRCommonElement
getModeValue
in interface JRCommonElement
public ModeEnum getOwnModeValue()
getOwnModeValue
in interface JRCommonElement
public void setMode(ModeEnum modeValue)
JRCommonElement
setMode
in interface JRCommonElement
public int getX()
JRElement
public void setX(int x)
JRElement
public void setY(int y)
public int getY()
JRElement
public int getWidth()
getWidth
in interface JRCommonElement
public void setHeight(int height)
public int getHeight()
getHeight
in interface JRCommonElement
public boolean isRemoveLineWhenBlank()
JRElement
isRemoveLineWhenBlank
in interface JRElement
public void setRemoveLineWhenBlank(boolean isRemoveLine)
JRElement
setRemoveLineWhenBlank
in interface JRElement
public boolean isPrintInFirstWholeBand()
JRElement
isPrintInFirstWholeBand
in interface JRElement
JRElement.isPrintRepeatedValues()
public void setPrintInFirstWholeBand(boolean isPrint)
JRElement
setPrintInFirstWholeBand
in interface JRElement
JRElement.isPrintRepeatedValues()
public boolean isPrintWhenDetailOverflows()
JRElement
isPrintWhenDetailOverflows
in interface JRElement
public void setPrintWhenDetailOverflows(boolean isPrint)
JRElement
setPrintWhenDetailOverflows
in interface JRElement
public Color getForecolor()
getForecolor
in interface JRCommonElement
public Color getOwnForecolor()
getOwnForecolor
in interface JRCommonElement
public void setForecolor(Color forecolor)
setForecolor
in interface JRCommonElement
public Color getBackcolor()
getBackcolor
in interface JRCommonElement
public Color getOwnBackcolor()
getOwnBackcolor
in interface JRCommonElement
public void setBackcolor(Color backcolor)
setBackcolor
in interface JRCommonElement
public JRExpression getPrintWhenExpression()
JRElement
getPrintWhenExpression
in interface JRElement
public JRGroup getPrintWhenGroupChanges()
JRElement
getPrintWhenGroupChanges
in interface JRElement
JRElement.isPrintRepeatedValues()
public JRElementGroup getElementGroup()
JRElement
getElementGroup
in interface JRElement
StretchTypeEnum
protected boolean isPrintWhenExpressionNull()
protected void setPrintWhenExpressionNull(boolean isPrintWhenExpressionNull)
protected boolean isPrintWhenTrue()
protected void setPrintWhenTrue(boolean isPrintWhenTrue)
public boolean isToPrint()
protected void setToPrint(boolean isToPrint)
protected boolean isReprinted()
protected void setReprinted(boolean isReprinted)
public boolean isAlreadyPrinted()
public void setAlreadyPrinted(boolean isAlreadyPrinted)
protected JRElement[] getGroupElements()
protected Collection<JRFillElement> getDependantElements()
protected void addDependantElement(JRFillElement element)
protected int getRelativeY()
protected void setRelativeY(int relativeY)
protected int getCollapsedHeightAbove()
protected void setCollapsedHeightAbove(int collapsedHeightAbove)
protected int getCollapsedHeightBelow()
protected void setCollapsedHeightBelow(int collapsedHeightBelow)
public int getStretchHeight()
protected void setStretchHeight(int stretchHeight)
public int getPrepareHeight()
protected void setPrepareHeight(int prepareHeight)
protected JRFillBand getBand()
protected void setBand(JRFillBand band)
protected void initStyleProviders()
protected void reset()
protected void setCurrentEvaluation(byte evaluation)
protected abstract void evaluate(byte evaluation) throws JRException
JRException
protected void evaluateStyle(byte evaluation) throws JRException
JRException
protected void evaluatePrintWhenExpression(byte evaluation) throws JRException
JRException
protected abstract void rewind() throws JRException
JRException
protected abstract JRPrintElement fill() throws JRException
JRException
protected JRTemplateElement getElementTemplate()
protected abstract JRTemplateElement createElementTemplate()
protected boolean prepare(int availableHeight, boolean isOverflow) throws JRException
JRException
protected void _stretchElement(int bandStretch)
protected void _stretchElementToHeight(int stretchHeight)
protected boolean stretchElement(int containerStretch)
protected boolean stretchElementToContainer(int containerStretch)
protected boolean stretchElementToElementGroup()
protected boolean stretchElementToHeight(int stretchHeight)
protected void _moveDependantElements()
protected void moveDependantElements()
protected abstract void resolveElement(JRPrintElement element, byte evaluation) throws JRException
element
- the elementevaluation
- the evaluation typeJRException
protected void performDelayedEvaluation(JRPrintElement element, byte evaluation) throws JRException
JRException
protected boolean delayedEvaluationUpdatesTemplate()
public final Object evaluateExpression(JRExpression expression, byte evaluation) throws JRException
expression
- the expressionevaluation
- the evaluation typeJRException
protected boolean isValueRepeating()
Dynamic elements should call setValueRepeating(boolean)
on
evaluate(byte)
. Static elements don't have to do anything, this method
will return true
by default.
setValueRepeating(boolean)
protected void setValueRepeating(boolean isValueRepeating)
This method should be called by dynamic elements on evaluate(byte)
.
isValueRepeating
- whether the value of the element is repeatingisValueRepeating()
protected JRFillVariable getVariable(String variableName)
protected JRFillField getField(String fieldName)
protected EvaluationTimeEnum getEvaluationTimeValue()
protected void resolveElement(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime) throws JRException
element
- the elementevaluation
- the evaluation typeevaluationTime
- the current evaluation timeJRException
protected void initDelayedEvaluations()
protected void collectDelayedEvaluations()
protected void collectStyleDelayedEvaluations()
protected void collectDelayedEvaluations(JRStyle style)
protected void collectDelayedEvaluations(JRExpression expression)
protected void collectStyleProviderDelayedEvaluations()
protected void initDelayedEvaluationPrint(JRRecordedValuesPrintElement printElement) throws JRException
JRException
protected void delayedEvaluate(JRRecordedValuesPrintElement printElement, JREvaluationTime evaluationTime, byte evaluation) throws JRException
JRException
public void setConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer)
public JRFillElementContainer getConditionalStylesContainer()
public JRStyle getStyle()
JRStyleContainer
getStyle
in interface JRStyleContainer
protected JRTemplateElement getTemplate(JRStyle style)
protected void registerTemplate(JRStyle style, JRTemplateElement template)
protected final void setShrinkable(boolean shrinkable)
This flag is only effective when isRemoveLineWhenBlank
is also set.
shrinkable
- whether the element is shrinkableprotected void stretchHeightFinal()
protected boolean isEvaluateNow()
protected boolean isAutoEvaluateNow()
protected boolean isEvaluateAuto()
public String getStyleNameReference()
JRStyleContainer
templates
and are resolved
at fill time.
This attribute is only effective if no direct style (as returned by getStyle()
is specified for this object.getStyleNameReference
in interface JRStyleContainer
public void setStyle(JRStyle style)
JRStyleSetter
setStyle
in interface JRStyleSetter
style
- the style to be used by the objectpublic void setStyleNameReference(String name)
JRStyleSetter
setStyleNameReference
in interface JRStyleSetter
name
- the name of an external stylepublic Object clone()
clone
in interface JRCloneable
clone
in class Object
public Object clone(JRElementGroup parentGroup)
public JRElement clone(JRElementGroup parentGroup, int y)
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
public JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
null
if no parentpublic JRPropertyExpression[] getPropertyExpressions()
JRElement
getPropertyExpressions
in interface JRElement
protected void transferProperties(JRTemplateElement template)
protected void transferProperties(JRPrintElement element)
protected JRPropertiesMap getEvaluatedProperties()
protected void evaluateProperties(byte evaluation) throws JRException
JRException
protected void setOriginProvider(JROriginProvider originProvider)
protected JROrigin getElementOrigin()
protected boolean isDelayedStyleEvaluation()
public JRBaseFiller getFiller()
public boolean hasDynamicProperties()
hasDynamicProperties
in interface DynamicPropertiesHolder
public boolean hasDynamicProperty(String name)
hasDynamicProperty
in interface DynamicPropertiesHolder
public JRPropertiesMap getDynamicProperties()
getDynamicProperties
in interface DynamicPropertiesHolder
protected JRStyle getInitStyle()
protected JRElement getParent()
protected void addDynamicProperty(String name, JRExpression expression)
protected void setExpressionEvaluator(JRFillExpressionEvaluator expressionEvaluator)
Copyright © 2017. All rights reserved.