Package net.sf.jasperreports.engine.fill
Class JRFillTextElement
java.lang.Object
net.sf.jasperreports.engine.fill.JRFillElement
net.sf.jasperreports.engine.fill.JRFillTextElement
- All Implemented Interfaces:
Cloneable,DynamicPropertiesHolder,JRFillCloneable,JRBoxContainer,JRChild,JRCloneable,JRCommonElement,JRCommonText,JRElement,JRFont,JRIdentifiable,JRParagraphContainer,JRPropertiesHolder,JRStyleContainer,JRStyleSetter,JRTextAlignment,JRTextElement,JRVisitable
- Direct Known Subclasses:
JRFillStaticText,JRFillTextField
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final JRLineBoxprotected final JRParagraphprotected final booleanprotected JRLineBoxprotected JRParagraphstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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, templatesFields inherited from interface net.sf.jasperreports.engine.JRCommonText
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXTFields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLEFields inherited from interface net.sf.jasperreports.engine.JRFont
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAMEFields inherited from interface net.sf.jasperreports.engine.JRTextElement
PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRFillTextElement(JRBaseFiller filler, JRTextElement textElement, JRFillObjectFactory factory) protectedJRFillTextElement(JRFillTextElement textElement, JRFillCloneFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanprotected voidchopTextElement(int availableStretchHeight) protected intprotected voidprotected voidevaluateStyle(byte evaluation) floatfloatGets the text horizontal alignment.protected floatprotected short[]protected floatReturns the text markup.getMode()Returns the element transparency mode.Gets the text own rotation.protected JRLineBoxprotected JRParagraphprotected JRStyledTextprotected StringGets the text rotation.protected JRStyledTextprotected Map<AttributedCharacterIterator.Attribute, Object> protected intprotected floatprotected intprotected StringfloatGets the text vertical alignment.booleanisBold()protected booleanprotected booleanbooleanisItalic()booleanbooleanbooleanprotected booleanprotected booleanprepare(int availableHeight, boolean isOverflow, boolean isOverflowAllowed) protected StringprocessMarkupText(String text) voidreset()protected voidvoidrewind()protected floatprotected abstract booleanprotected voidsetAverageCharWidth(float averageCharWidth) voidAlternative setBold method which allows also to reset the "own" isBold property.protected voidsetCutParagraph(boolean isCutParagraph) voidsetFontName(String fontName) voidsetFontSize(Float size) voidsetHeight(int height) voidsetHorizontalTextAlign(HorizontalTextAlignEnum horizontalAlignment) Sets the text horizontal alignment.voidAlternative setItalic method which allows also to reset the "own" isItalic property.protected voidsetLeadingOffset(float leadingOffset) protected voidsetLineBreakOffsets(short[] lineBreakOffsets) protected voidsetLineSpacingFactor(float lineSpacingFactor) voidvoidsetPdfEmbedded(Boolean isPdfEmbedded) Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.voidsetPdfEncoding(String pdfEncoding) voidsetPdfFontName(String pdfFontName) protected voidsetPrintText(JRPrintText printText) protected voidsetPrintText(JRPrintText printText, String text) protected voidsetRawText(String rawText) voidsetRotation(RotationEnum rotation) Sets the text rotation.voidsetStrikeThrough(Boolean isStrikeThrough) Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.protected voidsetTextEnd(int textEnd) protected voidsetTextHeight(float textHeight) protected voidsetTextStart(int textStart) protected voidsetTextTruncateSuffix(String textTruncateSuffix) protected voidsetTextWidth(float textWidth) voidsetUnderline(Boolean isUnderline) Alternative setUnderline method which allows also to reset the "own" isUnderline property.voidsetVerticalTextAlign(VerticalTextAlignEnum verticalAlignment) Gets the text vertical alignment.voidsetWidth(int width) Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, addDynamicProperty, clone, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, collectStyleProviderDelayedEvaluations, createElementTemplate, delayedEvaluate, delayedEvaluationUpdatesTemplate, evaluate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, fill, getBackcolor, getBand, getBookmarkLevel, getCollapsedHeightAbove, getCollapsedHeightBelow, getConditionalStylesContainer, getDefaultStyleProvider, getDependantElements, getDynamicProperties, getElementGroup, getElementOrigin, getElementTemplate, getEvaluatedProperties, getEvaluationTime, getField, getFiller, getForecolor, getGroupElements, getHeight, getInitStyle, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getParent, 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, resolveElement, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setCollapsedHeightAbove, setCollapsedHeightBelow, setConditionalStylesContainer, setCurrentEvaluation, setExpressionEvaluator, setForecolor, setMode, setOriginProvider, setPositionType, setPrepareHeight, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setX, setY, stretchElement, stretchElementToContainer, stretchElementToElementGroup, stretchElementToHeight, toPopulateTemplateStyle, transferProperties, transferPropertiesMethods 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.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setModeMethods inherited from interface net.sf.jasperreports.engine.JRElement
clone, collectExpressions, getElementGroup, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setXMethods inherited from interface net.sf.jasperreports.engine.fill.JRFillCloneable
createCloneMethods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUIDMethods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasPropertiesMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReferenceMethods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Field Details
-
EXCEPTION_MESSAGE_KEY_INVALID_START_INDEX
- See Also:
-
PROPERTY_CONSUME_SPACE_ON_OVERFLOW
- See Also:
-
PROPERTY_SCALE_FONT_STEP_LIMIT
- See Also:
-
PROPERTY_CUT_TEXT_MAX_HEIGHT
- See Also:
-
PROPERTY_LEGACY_TEXT_MEASURING
- See Also:
-
initLineBox
-
initParagraph
-
lineBox
-
paragraph
-
keepAverageCharWidth
protected final boolean keepAverageCharWidth
-
-
Constructor Details
-
JRFillTextElement
protected JRFillTextElement(JRBaseFiller filler, JRTextElement textElement, JRFillObjectFactory factory) -
JRFillTextElement
-
-
Method Details
-
ensureTextMeasurer
protected void ensureTextMeasurer() -
evaluateStyle
- Overrides:
evaluateStylein classJRFillElement- Throws:
JRException
-
getMode
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:
getModein interfaceJRCommonElement- Overrides:
getModein classJRFillElement
-
getHorizontalTextAlign
Description copied from interface:JRTextAlignmentGets the text horizontal alignment.- Specified by:
getHorizontalTextAlignin interfaceJRTextAlignment- Returns:
- a value representing one of the horizontal text alignment constants in
HorizontalTextAlignEnum
-
getOwnHorizontalTextAlign
- Specified by:
getOwnHorizontalTextAlignin interfaceJRTextAlignment
-
setHorizontalTextAlign
Description copied from interface:JRTextAlignmentSets the text horizontal alignment.- Specified by:
setHorizontalTextAlignin interfaceJRTextAlignment- Parameters:
horizontalAlignment- a value representing one of the horizontal text alignment constants inHorizontalTextAlignEnum
-
getVerticalTextAlign
Description copied from interface:JRTextAlignmentGets the text vertical alignment.- Specified by:
getVerticalTextAlignin interfaceJRTextAlignment- Returns:
- a value representing one of the vertical text alignment constants in
VerticalTextAlignEnum
-
getOwnVerticalTextAlign
- Specified by:
getOwnVerticalTextAlignin interfaceJRTextAlignment
-
setVerticalTextAlign
Description copied from interface:JRTextAlignmentGets the text vertical alignment.- Specified by:
setVerticalTextAlignin interfaceJRTextAlignment- Parameters:
verticalAlignment- a value representing one of the vertical text alignment constants inVerticalTextAlignEnum
-
getRotation
Description copied from interface:JRCommonTextGets the text rotation.- Specified by:
getRotationin interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
getOwnRotation
Description copied from interface:JRCommonTextGets the text own rotation.- Specified by:
getOwnRotationin interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
setRotation
Description copied from interface:JRCommonTextSets the text rotation.- Specified by:
setRotationin interfaceJRCommonText- Parameters:
rotation- a value representing one of the text rotation constants inRotationEnum
-
getMarkup
Description copied from interface:JRCommonTextReturns the text markup.- Specified by:
getMarkupin interfaceJRCommonText
-
getOwnMarkup
- Specified by:
getOwnMarkupin interfaceJRCommonText
-
setMarkup
- Specified by:
setMarkupin interfaceJRCommonText
-
getPrintLineBox
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getPrintParagraph
-
getParagraph
- Specified by:
getParagraphin interfaceJRParagraphContainer
-
getStyledTextAttributes
-
getLineSpacingFactor
protected float getLineSpacingFactor() -
setLineSpacingFactor
protected void setLineSpacingFactor(float lineSpacingFactor) -
getLeadingOffset
protected float getLeadingOffset() -
setLeadingOffset
protected void setLeadingOffset(float leadingOffset) -
getRunDirection
-
getTextWidth
public float getTextWidth() -
setTextWidth
protected void setTextWidth(float textWidth) -
getAverageCharWidth
public float getAverageCharWidth() -
setAverageCharWidth
protected void setAverageCharWidth(float averageCharWidth) -
getTextHeight
protected float getTextHeight() -
setTextHeight
protected void setTextHeight(float textHeight) -
getTextStart
protected int getTextStart() -
setTextStart
protected void setTextStart(int textStart) -
getTextEnd
protected int getTextEnd() -
setTextEnd
protected void setTextEnd(int textEnd) -
isCutParagraph
protected boolean isCutParagraph() -
setCutParagraph
protected void setCutParagraph(boolean isCutParagraph) -
getLineBreakOffsets
protected short[] getLineBreakOffsets() -
setLineBreakOffsets
protected void setLineBreakOffsets(short[] lineBreakOffsets) -
resetTextChunk
protected void resetTextChunk() -
getRawText
-
setRawText
-
reset
public void reset()- Overrides:
resetin classJRFillElement
-
rewind
public void rewind()- Specified by:
rewindin classJRFillElement
-
getStyledText
-
getProcessedStyledText
-
getTextString
-
prepare
protected boolean prepare(int availableHeight, boolean isOverflow, boolean isOverflowAllowed) throws JRException - Overrides:
preparein classJRFillElement- Throws:
JRException
-
chopTextElement
protected void chopTextElement(int availableStretchHeight) -
isConsumeSpaceOnOverflow
protected boolean isConsumeSpaceOnOverflow() -
canOverflow
protected abstract boolean canOverflow() -
scaleFontToFit
protected abstract boolean scaleFontToFit() -
getFontName
- Specified by:
getFontNamein interfaceJRFont
-
getOwnFontName
- Specified by:
getOwnFontNamein interfaceJRFont
-
setFontName
- Specified by:
setFontNamein interfaceJRFont
-
isBold
public boolean isBold() -
isOwnBold
-
setBold
Alternative setBold method which allows also to reset the "own" isBold property. -
isItalic
public boolean isItalic() -
isOwnItalic
- Specified by:
isOwnItalicin interfaceJRFont
-
setItalic
Alternative setItalic method which allows also to reset the "own" isItalic property. -
isUnderline
public boolean isUnderline()- Specified by:
isUnderlinein interfaceJRFont
-
isOwnUnderline
- Specified by:
isOwnUnderlinein interfaceJRFont
-
setUnderline
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderlinein interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()- Specified by:
isStrikeThroughin interfaceJRFont
-
isOwnStrikeThrough
- Specified by:
isOwnStrikeThroughin interfaceJRFont
-
setStrikeThrough
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThroughin interfaceJRFont
-
getFontSize
public float getFontSize()- Specified by:
getFontSizein interfaceJRCommonText- Specified by:
getFontSizein interfaceJRFont
-
getOwnFontSize
- Specified by:
getOwnFontSizein interfaceJRFont
-
setFontSize
- Specified by:
setFontSizein interfaceJRFont
-
getPdfFontName
- Specified by:
getPdfFontNamein interfaceJRFont
-
getOwnPdfFontName
- Specified by:
getOwnPdfFontNamein interfaceJRFont
-
setPdfFontName
- Specified by:
setPdfFontNamein interfaceJRFont
-
getPdfEncoding
- Specified by:
getPdfEncodingin interfaceJRFont
-
getOwnPdfEncoding
- Specified by:
getOwnPdfEncodingin interfaceJRFont
-
setPdfEncoding
- Specified by:
setPdfEncodingin interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()- Specified by:
isPdfEmbeddedin interfaceJRFont
-
isOwnPdfEmbedded
- Specified by:
isOwnPdfEmbeddedin interfaceJRFont
-
setPdfEmbedded
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbeddedin interfaceJRFont
-
getDefaultLineColor
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
setHeight
public void setHeight(int height) - Overrides:
setHeightin classJRFillElement
-
setWidth
public void setWidth(int width) - Specified by:
setWidthin interfaceJRElement- Overrides:
setWidthin classJRFillElement
-
processMarkupText
-
setPrintText
-
keepFullText
protected boolean keepFullText() -
scaleFontStepLimit
protected float scaleFontStepLimit() -
cutTextMaxHeight
protected int cutTextMaxHeight() -
setPrintText
-
getTextTruncateSuffix
-
setTextTruncateSuffix
-