Package net.sf.jasperreports.engine.fill
Class JRFillElementContainer
java.lang.Object
net.sf.jasperreports.engine.fill.JRFillElementGroup
net.sf.jasperreports.engine.fill.JRFillElementContainer
- All Implemented Interfaces:
Cloneable,FillContainerContext,JRFillCloneable,JRChild,JRCloneable,JRElementGroup,JRVisitable
- Direct Known Subclasses:
FillListContents,JRFillBand,JRFillCellContents,JRFillFrame.JRFillFrameElements
public abstract class JRFillElementContainer
extends JRFillElementGroup
implements FillContainerContext
Abstract implementation of an element container filler.
This is the base for band, frame and crosstab cell fillers.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected JRFillElement[]protected final JRFillExpressionEvaluatorprotected JRBaseFillerprotected booleanprotected booleanprotected booleanprotected booleanFields inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
bottomElementInGroup, children, elementGroup, elements, topElementInGroup -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRFillElementContainer(JRBaseFiller filler, JRElementGroup container, JRFillObjectFactory factory) protectedJRFillElementContainer(JRFillElementContainer container, JRFillCloneFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidDeprecated.To be removed.protected void_prepareElements(int availableHeight, boolean isOverflowAllowed) Deprecated.To be removed.protected voidDeprecated.To be removed.protected void_setStretchHeight(int stretchHeight) Deprecated.To be removed.protected voidaddSubElements(JRPrintElementContainer printContainer, JRFillElement element, Collection<? extends JRPrintElement> printElements) protected booleanbuildConsolidatedStyle(JRStyle style, byte evaluation, StringBuilder code, List<JRStyle> condStylesToApply) protected intprotected voidcollectConditionalStyle(JRStyle style) protected voidevaluate(byte evaluation) protected JRStyleevaluateConditionalStyle(JRStyle initialStyle, byte evaluation) protected voidevaluateConditionalStyles(byte evaluation) voidfillElements(JRPrintElementContainer printContainer) Fills the elements from this container into a print element container.protected abstract intReturns the actual height of the element container.protected abstract intReturns the height of the element container.getEvaluatedConditionalStyle(JRStyle parentStyle) protected intprotected intprotected voidFind all styles containing conditional styles which are referenced by elements in this band.protected voidprotected final voidprotected voidinitFill()booleanbooleanbooleanprotected voidprotected voidprepareElements(int availableHeight, boolean isOverflowAllowed) protected voidprepareStretchHeight(int availableHeight, boolean isOverflowAllowed) protected voidprotected voidprotected voidrewind()protected final voidsetElementOriginProvider(JROriginProvider originProvider) protected voidsetStretchHeight(int stretchHeight) protected voidThis method is deprecated and is going to be removed.protected voidprotected voidbooleanIndicates whether the elements in this container will overflow.Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
clone, clone, createClone, getChildren, getElementByKey, getElementGroup, getElements, getStretchHeightDiff, reset, visitMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.fill.FillContainerContext
isSplitTypePreventInhibited
-
Field Details
-
filler
-
willOverflowWithElements
protected boolean willOverflowWithElements -
willOverflowWithWhiteSpace
protected boolean willOverflowWithWhiteSpace -
isOverflow
protected boolean isOverflow -
currentOverflowWithElements
protected boolean currentOverflowWithElements -
currentOverflowWithWhiteSpace
protected boolean currentOverflowWithWhiteSpace -
atLeastOneElementIsToPrint
protected boolean atLeastOneElementIsToPrint -
expressionEvaluator
-
deepElements
-
stylesToEvaluate
-
evaluatedStyles
-
hasPrintWhenOverflowElement
protected boolean hasPrintWhenOverflowElement
-
-
Constructor Details
-
JRFillElementContainer
protected JRFillElementContainer(JRBaseFiller filler, JRElementGroup container, JRFillObjectFactory factory) -
JRFillElementContainer
-
-
Method Details
-
initDeepElements
protected void initDeepElements() -
_initElements
protected final void _initElements()Deprecated.To be removed. -
initElements
protected final void initElements() -
evaluate
- Throws:
JRException
-
resetElements
protected void resetElements() -
willOverflow
public boolean willOverflow()Indicates whether the elements in this container will overflow.- Returns:
- whether this container will overflow
-
initFill
protected void initFill() -
_prepareElements
Deprecated.To be removed.- Throws:
JRException
-
prepareElements
- Throws:
JRException
-
prepareStretchHeight
protected void prepareStretchHeight(int availableHeight, boolean isOverflowAllowed) throws JRException - Throws:
JRException
-
calculateStretchHeight
- Throws:
JRException
-
isLegacyElementStretchEnabled
public boolean isLegacyElementStretchEnabled() -
isCurrentOverflow
public boolean isCurrentOverflow()- Specified by:
isCurrentOverflowin interfaceFillContainerContext
-
isCurrentOverflowAllowed
public boolean isCurrentOverflowAllowed()- Specified by:
isCurrentOverflowAllowedin interfaceFillContainerContext
-
_setStretchHeight
protected void _setStretchHeight(int stretchHeight) Deprecated.To be removed. -
stretchElements
protected void stretchElements()This method is deprecated and is going to be removed. Not marked as deprecated to avoid deprecation warnings. -
setStretchHeight
protected void setStretchHeight(int stretchHeight) -
stretchElementsToElementGroup
protected void stretchElementsToElementGroup() -
stretchElementsToContainer
protected void stretchElementsToContainer() -
getStretchHeight
protected int getStretchHeight() -
moveBandBottomElements
protected void moveBandBottomElements() -
_removeBlankElements
protected void _removeBlankElements()Deprecated.To be removed. -
removeBlankElements
protected void removeBlankElements() -
fillElements
Fills the elements from this container into a print element container.- Parameters:
printContainer- the print element container- Throws:
JRException
-
addSubElements
protected void addSubElements(JRPrintElementContainer printContainer, JRFillElement element, Collection<? extends JRPrintElement> printElements) -
rewind
- Throws:
JRException
-
getFirstY
protected int getFirstY() -
getActualContainerHeight
protected abstract int getActualContainerHeight()Returns the actual height of the element container. Some element containers such as frames have a larger calculated container height, resulting from content being placed beyond container declared height.- Returns:
- the height of the element container
-
getContainerHeight
protected abstract int getContainerHeight()Returns the height of the element container.- Returns:
- the height of the element container
-
initConditionalStyles
protected void initConditionalStyles()Find all styles containing conditional styles which are referenced by elements in this band. -
collectConditionalStyle
-
evaluateConditionalStyles
- Throws:
JRException
-
evaluateConditionalStyle
protected JRStyle evaluateConditionalStyle(JRStyle initialStyle, byte evaluation) throws JRException - Throws:
JRException
-
buildConsolidatedStyle
protected boolean buildConsolidatedStyle(JRStyle style, byte evaluation, StringBuilder code, List<JRStyle> condStylesToApply) throws JRException - Throws:
JRException
-
getEvaluatedConditionalStyle
-
setElementOriginProvider
-