Package net.sf.jasperreports.engine.fill
Class JRFillCellContents
java.lang.Object
net.sf.jasperreports.engine.fill.JRFillElementGroup
net.sf.jasperreports.engine.fill.JRFillElementContainer
net.sf.jasperreports.engine.fill.JRFillCellContents
- All Implemented Interfaces:
Cloneable,JRCellContents,FillContainerContext,JRFillCloneable,JRBoxContainer,JRChild,JRCloneable,JRElementGroup,JRPropertiesHolder,JRStyleContainer,JRStyleSetter,JRVisitable
public class JRFillCellContents
extends JRFillElementContainer
implements JRCellContents, JRStyleSetter
Crosstab cell contents filler.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
FieldsFields inherited from class net.sf.jasperreports.engine.fill.JRFillElementContainer
currentOverflowWithElements, currentOverflowWithWhiteSpace, deepElements, evaluatedStyles, expressionEvaluator, filler, hasPrintWhenOverflowElement, isOverflow, stylesToEvaluate, willOverflowWithElements, willOverflowWithWhiteSpaceFields inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
bottomElementInGroup, children, elementGroup, elements, topElementInGroupFields inherited from interface net.sf.jasperreports.crosstabs.JRCellContents
NOT_CALCULATED, PROPERTIES_PREFIX, PROPERTY_COLUMN_SPAN, PROPERTY_ROW_SPAN, PROPERTY_TYPE, TYPE_COLUMN_HEADER, TYPE_CROSSTAB_HEADER, TYPE_CROSSTAB_TITLE, TYPE_DATA, TYPE_NO_DATA_CELL, TYPE_ROW_HEADER -
Constructor Summary
ConstructorsModifierConstructorDescriptionJRFillCellContents(JRBaseFiller filler, JRCellContents cell, String cellType, JRFillCrosstabObjectFactory factory) protectedJRFillCellContents(JRFillCellContents cellContents, JRFillCloneFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddElement(int index, JRFillElement element) protected voidaddHtmlClass(String className) createClone(JRFillCloneFactory factory) Creates a working clone of itself.protected voidevaluate(byte evaluation) protected JRPrintFramefill()protected intReturns the actual height of the element container.Returns the cell background color.protected intgetBoxContents(boolean left, boolean right, boolean top) protected intReturns the height of the element container.intReturns the computed cell height.intgetMode()Returns the cell transparency mode.protected JROriginReturns the parent properties holder, whose properties are used as defaults for this object.protected intReturns this object's properties map.getStyle()Returns this object's style.Returns the name of an external style which is to be used by this object.protected JRTemplateFrameprotected intgetTransformedContents(int newWidth, int newHeight, CrosstabColumnPositionEnum xPosition, CrosstabRowPositionEnum yPosition) intintgetWidth()Returns the computed cell width.booleanChecks whether the object has any properties.protected voidFind all styles containing conditional styles which are referenced by elements in this band.booleanisSplitTypePreventInhibited(boolean isTopLevelCall) protected voidprepare(int availableHeight) voidprotected voidprotected voidsetCellProperties(JRTemplatePrintFrame printCell) voidsetHorizontalSpan(int horizontalSpan) voidsetPrintProperty(String name, String value) voidSet the style on the object.voidsetStyleNameReference(String name) Set the name of an external style that is to be used by the object.voidsetVerticalPositionType(CrosstabRowPositionEnum positionType) voidsetVerticalSpan(int span) voidsetX(int x) voidsetY(int y) protected voidstretchTo(int stretchHeight) protected voidverticallyPositionElements(JRTemplatePrintFrame printCell) Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElementContainer
addSubElements, buildConsolidatedStyle, calculateStretchHeight, collectConditionalStyle, evaluateConditionalStyle, evaluateConditionalStyles, fillElements, getEvaluatedConditionalStyle, getFirstY, getStretchHeight, initDeepElements, initElements, initFill, isCurrentOverflow, isCurrentOverflowAllowed, moveBandBottomElements, prepareElements, prepareStretchHeight, removeBlankElements, resetElements, rewind, setElementOriginProvider, setStretchHeight, stretchElementsToContainer, stretchElementsToElementGroup, willOverflowMethods inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
clone, clone, 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.JRCloneable
cloneMethods inherited from interface net.sf.jasperreports.engine.JRElementGroup
getChildren, getElementByKey, getElementGroup, getElementsMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleNameMethods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Field Details
-
EXCEPTION_MESSAGE_KEY_CANNOT_SHRINK_CONTENTS
- See Also:
-
-
Constructor Details
-
JRFillCellContents
public JRFillCellContents(JRBaseFiller filler, JRCellContents cell, String cellType, JRFillCrosstabObjectFactory factory) -
JRFillCellContents
-
-
Method Details
-
getBackcolor
Description copied from interface:JRCellContentsReturns the cell background color.The cell is filled with the background color only if the cell has opaque mode.
- Specified by:
getBackcolorin interfaceJRCellContents- Returns:
- the cell backcolor
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
setBox
-
getHeight
public int getHeight()Description copied from interface:JRCellContentsReturns the computed cell height.- Specified by:
getHeightin interfaceJRCellContents- Returns:
- the computed cell height
- See Also:
-
getWidth
public int getWidth()Description copied from interface:JRCellContentsReturns the computed cell width.- Specified by:
getWidthin interfaceJRCellContents- Returns:
- the computed cell width
- See Also:
-
getBoxContents
-
getTransformedContents
public JRFillCellContents getTransformedContents(int newWidth, int newHeight, CrosstabColumnPositionEnum xPosition, CrosstabRowPositionEnum yPosition) throws JRException - Throws:
JRException
-
prepare
- Throws:
JRException
-
setPrintProperty
-
fill
- Throws:
JRException
-
setCellProperties
-
getTemplateFrame
-
getOrigin
-
verticallyPositionElements
-
getPrintHeight
protected int getPrintHeight() -
stretchTo
protected void stretchTo(int stretchHeight) -
getContainerHeight
protected int getContainerHeight()Description copied from class:JRFillElementContainerReturns the height of the element container.- Specified by:
getContainerHeightin classJRFillElementContainer- Returns:
- the height of the element container
-
getActualContainerHeight
protected int getActualContainerHeight()Description copied from class:JRFillElementContainerReturns 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.- Specified by:
getActualContainerHeightin classJRFillElementContainer- Returns:
- the height of the element container
-
getTopPadding
protected int getTopPadding() -
getBottomPadding
protected int getBottomPadding() -
createClone
-
createClone
Description copied from interface:JRFillCloneableCreates a working clone of itself.- Specified by:
createClonein interfaceJRFillCloneable- Overrides:
createClonein classJRFillElementGroup- Parameters:
factory- the clone factory to use while creating the clone- Returns:
- a working clone of itself
-
getWorkingClone
-
releaseWorkingClone
public void releaseWorkingClone() -
setX
public void setX(int x) -
setY
public void setY(int y) -
getVerticalSpan
public int getVerticalSpan() -
setVerticalSpan
public void setVerticalSpan(int span) -
setVerticalPositionType
-
getHorizontalSpan
public int getHorizontalSpan() -
setHorizontalSpan
public void setHorizontalSpan(int horizontalSpan) -
evaluate
- Overrides:
evaluatein classJRFillElementContainer- Throws:
JRException
-
getDefaultStyleProvider
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyle
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
initConditionalStyles
protected void initConditionalStyles()Description copied from class:JRFillElementContainerFind all styles containing conditional styles which are referenced by elements in this band.- Overrides:
initConditionalStylesin classJRFillElementContainer
-
getMode
Description copied from interface:JRCellContentsReturns the cell transparency mode.- Specified by:
getModein interfaceJRCellContents- Returns:
ModeEnum.OPAQUEorModeEnum.TRANSPARENT
-
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
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
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
-
getDefaultLineColor
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
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
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
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
-
addElement
-
addHtmlClass
-
isSplitTypePreventInhibited
public boolean isSplitTypePreventInhibited(boolean isTopLevelCall) - Specified by:
isSplitTypePreventInhibitedin interfaceFillContainerContext
-