net.sf.jasperreports.engine.fill
Class JRFillTextElement

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRFillElement
      extended by net.sf.jasperreports.engine.fill.JRFillTextElement
All Implemented Interfaces:
java.lang.Cloneable, JRFillCloneable, JRAlignment, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRCommonText, JRElement, JRFont, JRIdentifiable, JRParagraphContainer, JRPropertiesHolder, JRStyleContainer, JRStyleSetter, JRTextElement, JRVisitable
Direct Known Subclasses:
JRFillStaticText, JRFillTextField

public abstract class JRFillTextElement
extends JRFillElement
implements JRTextElement

Version:
$Id: JRFillTextElement.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
protected  JRLineBox lineBox
           
protected  JRParagraph paragraph
           
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElement
band, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, elementGroup, elementId, expressionEvaluator, filler, initStyle, mergedProperties, originProvider, parent, printWhenGroupChanges, staticProperties, templates
 
Fields inherited from interface net.sf.jasperreports.engine.JRTextElement
PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX
 
Fields inherited from interface net.sf.jasperreports.engine.JRFont
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAME
 
Fields inherited from interface net.sf.jasperreports.engine.JRCommonText
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXT
 
Constructor Summary
protected JRFillTextElement(JRBaseFiller filler, JRTextElement textElement, JRFillObjectFactory factory)
           
protected JRFillTextElement(JRFillTextElement textElement, JRFillCloneFactory factory)
           
 
Method Summary
protected abstract  boolean canOverflow()
           
protected  void chopTextElement(int availableStretchHeight)
           
protected  void ensureTextMeasurer()
           
 java.awt.Color getDefaultLineColor()
           
 JRFont getFont()
          Deprecated.  
 java.lang.String getFontName()
           
 int getFontSize()
           
 HorizontalAlignEnum getHorizontalAlignmentValue()
          Gets the text horizontal alignment.
protected  float getLeadingOffset()
           
 JRLineBox getLineBox()
           
protected  short[] getLineBreakOffsets()
           
protected  float getLineSpacingFactor()
           
 LineSpacingEnum getLineSpacingValue()
          Deprecated. Replaced by JRParagraph.getLineSpacing().
 java.lang.String getMarkup()
          Returns the text markup.
protected  MarkupProcessor getMarkupProcessor(java.lang.String markup)
           
 ModeEnum getModeValue()
          Returns the element transparency mode.
 java.lang.String getOwnFontName()
           
 java.lang.Integer getOwnFontSize()
           
 HorizontalAlignEnum getOwnHorizontalAlignmentValue()
           
 LineSpacingEnum getOwnLineSpacingValue()
          Deprecated. Replaced by JRParagraph.getOwnLineSpacing().
 java.lang.String getOwnMarkup()
           
 java.lang.String getOwnPdfEncoding()
           
 java.lang.String getOwnPdfFontName()
           
 RotationEnum getOwnRotationValue()
          Gets the text own rotation.
 VerticalAlignEnum getOwnVerticalAlignmentValue()
           
 JRParagraph getParagraph()
           
 java.lang.String getPdfEncoding()
           
 java.lang.String getPdfFontName()
           
protected  java.lang.String getRawText()
           
 RotationEnum getRotationValue()
          Gets the text rotation.
 RunDirectionEnum getRunDirectionValue()
           
protected  JRStyledText getStyledText()
           
protected  java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> getStyledTextAttributes()
           
 java.lang.String getText()
           
protected  int getTextEnd()
           
protected  float getTextHeight()
           
protected  int getTextStart()
           
protected  java.lang.String getTextTruncateSuffix()
           
 VerticalAlignEnum getVerticalAlignmentValue()
          Gets the text vertical alignment.
 boolean isBold()
           
 boolean isItalic()
           
 java.lang.Boolean isOwnBold()
           
 java.lang.Boolean isOwnItalic()
           
 java.lang.Boolean isOwnPdfEmbedded()
           
 java.lang.Boolean isOwnStrikeThrough()
           
 java.lang.Boolean isOwnUnderline()
           
 boolean isPdfEmbedded()
           
 boolean isStrikeThrough()
           
 boolean isUnderline()
           
protected  java.lang.String processMarkupText(java.lang.String text)
           
protected  void reset()
           
protected  void resetTextChunk()
           
protected  void rewind()
           
 void setBold(boolean isBold)
           
 void setBold(java.lang.Boolean isBold)
          Alternative setBold method which allows also to reset the "own" isBold property.
 void setFontName(java.lang.String fontName)
           
 void setFontSize(int size)
           
 void setFontSize(java.lang.Integer size)
          Alternative setSize method which allows also to reset the "own" size property.
 void setHeight(int height)
           
 void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignment)
          Sets the text horizontal alignment.
 void setItalic(boolean isItalic)
           
 void setItalic(java.lang.Boolean isItalic)
          Alternative setItalic method which allows also to reset the "own" isItalic property.
protected  void setLeadingOffset(float leadingOffset)
           
protected  void setLineBreakOffsets(short[] lineBreakOffsets)
           
 void setLineSpacing(LineSpacingEnum lineSpacing)
          Deprecated. Replaced by JRParagraph.setLineSpacing(LineSpacingEnum).
protected  void setLineSpacingFactor(float lineSpacingFactor)
           
 void setMarkup(java.lang.String markup)
           
 void setPdfEmbedded(boolean isPdfEmbedded)
           
 void setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
          Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.
 void setPdfEncoding(java.lang.String pdfEncoding)
           
 void setPdfFontName(java.lang.String pdfFontName)
           
protected  void setPrintText(JRPrintText printText)
           
protected  void setRawText(java.lang.String rawText)
           
 void setRotation(RotationEnum rotation)
          Sets the text rotation.
 void setStrikeThrough(boolean isStrikeThrough)
           
 void setStrikeThrough(java.lang.Boolean isStrikeThrough)
          Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.
protected  void setTextEnd(int textEnd)
           
protected  void setTextHeight(float textHeight)
           
protected  void setTextStart(int textStart)
           
protected  void setTextTruncateSuffix(java.lang.String textTruncateSuffix)
           
 void setUnderline(boolean isUnderline)
           
 void setUnderline(java.lang.Boolean isUnderline)
          Alternative setUnderline method which allows also to reset the "own" isUnderline property.
 void setVerticalAlignment(VerticalAlignEnum verticalAlignment)
          Gets the text vertical alignment.
 void setWidth(int width)
           
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, createElementTemplate, delayedEvaluate, evaluate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, fill, getBackcolor, getBand, getDefaultStyleProvider, getDependantElements, getElementGroup, getElementOrigin, getElementTemplate, getEvaluatedProperties, getEvaluationTimeValue, getField, getForecolor, getGroupElements, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getRelativeY, getStretchHeight, getStretchTypeValue, getStyle, getStyleNameReference, getTemplate, getUUID, getVariable, getWidth, getX, getY, hasProperties, initDelayedEvaluationPrint, initDelayedEvaluations, isAlreadyPrinted, isAutoEvaluateNow, isDelayedStyleEvaluation, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, performDelayedEvaluation, prepare, registerTemplate, resolveElement, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setConditionalStylesContainer, setCurrentEvaluation, setForecolor, setMode, setOriginProvider, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setX, setY, stretchElement, stretchHeightFinal, transferProperties, transferProperties
 
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, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.fill.JRFillCloneable
createClone
 

Field Detail

lineBox

protected final JRLineBox lineBox

paragraph

protected final JRParagraph paragraph
Constructor Detail

JRFillTextElement

protected JRFillTextElement(JRBaseFiller filler,
                            JRTextElement textElement,
                            JRFillObjectFactory factory)

JRFillTextElement

protected JRFillTextElement(JRFillTextElement textElement,
                            JRFillCloneFactory factory)
Method Detail

ensureTextMeasurer

protected void ensureTextMeasurer()

getModeValue

public ModeEnum getModeValue()
Description copied from interface: JRCommonElement
Returns 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:
getModeValue in interface JRCommonElement
Overrides:
getModeValue in class JRFillElement

getHorizontalAlignmentValue

public HorizontalAlignEnum getHorizontalAlignmentValue()
Description copied from interface: JRAlignment
Gets the text horizontal alignment.

Specified by:
getHorizontalAlignmentValue in interface JRAlignment
Returns:
a value representing one of the horizontal alignment constants in HorizontalAlignEnum

getOwnHorizontalAlignmentValue

public HorizontalAlignEnum getOwnHorizontalAlignmentValue()
Specified by:
getOwnHorizontalAlignmentValue in interface JRAlignment

setHorizontalAlignment

public void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignment)
Description copied from interface: JRAlignment
Sets the text horizontal alignment.

Specified by:
setHorizontalAlignment in interface JRAlignment
Parameters:
horizontalAlignment - a value representing one of the horizontal alignment constants in HorizontalAlignEnum

getVerticalAlignmentValue

public VerticalAlignEnum getVerticalAlignmentValue()
Description copied from interface: JRAlignment
Gets the text vertical alignment.

Specified by:
getVerticalAlignmentValue in interface JRAlignment
Returns:
a value representing one of the vertical alignment constants in VerticalAlignEnum

getOwnVerticalAlignmentValue

public VerticalAlignEnum getOwnVerticalAlignmentValue()
Specified by:
getOwnVerticalAlignmentValue in interface JRAlignment

setVerticalAlignment

public void setVerticalAlignment(VerticalAlignEnum verticalAlignment)
Description copied from interface: JRAlignment
Gets the text vertical alignment.

Specified by:
setVerticalAlignment in interface JRAlignment
Parameters:
verticalAlignment - a value representing one of the vertical alignment constants in VerticalAlignEnum

getRotationValue

public RotationEnum getRotationValue()
Description copied from interface: JRCommonText
Gets the text rotation.

Specified by:
getRotationValue in interface JRCommonText
Returns:
a value representing one of the text rotation constants in RotationEnum

getOwnRotationValue

public RotationEnum getOwnRotationValue()
Description copied from interface: JRCommonText
Gets the text own rotation.

Specified by:
getOwnRotationValue in interface JRCommonText
Returns:
a value representing one of the text rotation constants in RotationEnum

setRotation

public void setRotation(RotationEnum rotation)
Description copied from interface: JRCommonText
Sets the text rotation.

Specified by:
setRotation in interface JRCommonText
Parameters:
rotation - a value representing one of the text rotation constants in RotationEnum

getLineSpacingValue

public LineSpacingEnum getLineSpacingValue()
Deprecated. Replaced by JRParagraph.getLineSpacing().

Specified by:
getLineSpacingValue in interface JRCommonText

getOwnLineSpacingValue

public LineSpacingEnum getOwnLineSpacingValue()
Deprecated. Replaced by JRParagraph.getOwnLineSpacing().

Specified by:
getOwnLineSpacingValue in interface JRCommonText

setLineSpacing

public void setLineSpacing(LineSpacingEnum lineSpacing)
Deprecated. Replaced by JRParagraph.setLineSpacing(LineSpacingEnum).

Specified by:
setLineSpacing in interface JRCommonText

getMarkup

public java.lang.String getMarkup()
Description copied from interface: JRCommonText
Returns the text markup.

Specified by:
getMarkup in interface JRCommonText

getOwnMarkup

public java.lang.String getOwnMarkup()
Specified by:
getOwnMarkup in interface JRCommonText

setMarkup

public void setMarkup(java.lang.String markup)
Specified by:
setMarkup in interface JRCommonText

getLineBox

public JRLineBox getLineBox()
Specified by:
getLineBox in interface JRBoxContainer

getParagraph

public JRParagraph getParagraph()
Specified by:
getParagraph in interface JRParagraphContainer

getFont

public JRFont getFont()
Deprecated. 


getStyledTextAttributes

protected java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> getStyledTextAttributes()

getLineSpacingFactor

protected float getLineSpacingFactor()

setLineSpacingFactor

protected void setLineSpacingFactor(float lineSpacingFactor)

getLeadingOffset

protected float getLeadingOffset()

setLeadingOffset

protected void setLeadingOffset(float leadingOffset)

getRunDirectionValue

public RunDirectionEnum getRunDirectionValue()

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)

getLineBreakOffsets

protected short[] getLineBreakOffsets()

setLineBreakOffsets

protected void setLineBreakOffsets(short[] lineBreakOffsets)

resetTextChunk

protected void resetTextChunk()

getRawText

protected java.lang.String getRawText()

setRawText

protected void setRawText(java.lang.String rawText)

reset

protected void reset()
Overrides:
reset in class JRFillElement

rewind

protected void rewind()
Specified by:
rewind in class JRFillElement

getStyledText

protected JRStyledText getStyledText()

getText

public java.lang.String getText()

chopTextElement

protected void chopTextElement(int availableStretchHeight)

canOverflow

protected abstract boolean canOverflow()

getFontName

public java.lang.String getFontName()
Specified by:
getFontName in interface JRFont

getOwnFontName

public java.lang.String getOwnFontName()
Specified by:
getOwnFontName in interface JRFont

setFontName

public void setFontName(java.lang.String fontName)
Specified by:
setFontName in interface JRFont

isBold

public boolean isBold()
Specified by:
isBold in interface JRFont

isOwnBold

public java.lang.Boolean isOwnBold()
Specified by:
isOwnBold in interface JRFont

setBold

public void setBold(boolean isBold)
Specified by:
setBold in interface JRFont

setBold

public void setBold(java.lang.Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.

Specified by:
setBold in interface JRFont

isItalic

public boolean isItalic()
Specified by:
isItalic in interface JRFont

isOwnItalic

public java.lang.Boolean isOwnItalic()
Specified by:
isOwnItalic in interface JRFont

setItalic

public void setItalic(boolean isItalic)
Specified by:
setItalic in interface JRFont

setItalic

public void setItalic(java.lang.Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.

Specified by:
setItalic in interface JRFont

isUnderline

public boolean isUnderline()
Specified by:
isUnderline in interface JRFont

isOwnUnderline

public java.lang.Boolean isOwnUnderline()
Specified by:
isOwnUnderline in interface JRFont

setUnderline

public void setUnderline(boolean isUnderline)
Specified by:
setUnderline in interface JRFont

setUnderline

public void setUnderline(java.lang.Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.

Specified by:
setUnderline in interface JRFont

isStrikeThrough

public boolean isStrikeThrough()
Specified by:
isStrikeThrough in interface JRFont

isOwnStrikeThrough

public java.lang.Boolean isOwnStrikeThrough()
Specified by:
isOwnStrikeThrough in interface JRFont

setStrikeThrough

public void setStrikeThrough(boolean isStrikeThrough)
Specified by:
setStrikeThrough in interface JRFont

setStrikeThrough

public void setStrikeThrough(java.lang.Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.

Specified by:
setStrikeThrough in interface JRFont

getFontSize

public int getFontSize()
Specified by:
getFontSize in interface JRCommonText
Specified by:
getFontSize in interface JRFont

getOwnFontSize

public java.lang.Integer getOwnFontSize()
Specified by:
getOwnFontSize in interface JRFont

setFontSize

public void setFontSize(int size)
Specified by:
setFontSize in interface JRFont

setFontSize

public void setFontSize(java.lang.Integer size)
Alternative setSize method which allows also to reset the "own" size property.

Specified by:
setFontSize in interface JRFont

getPdfFontName

public java.lang.String getPdfFontName()
Specified by:
getPdfFontName in interface JRFont

getOwnPdfFontName

public java.lang.String getOwnPdfFontName()
Specified by:
getOwnPdfFontName in interface JRFont

setPdfFontName

public void setPdfFontName(java.lang.String pdfFontName)
Specified by:
setPdfFontName in interface JRFont

getPdfEncoding

public java.lang.String getPdfEncoding()
Specified by:
getPdfEncoding in interface JRFont

getOwnPdfEncoding

public java.lang.String getOwnPdfEncoding()
Specified by:
getOwnPdfEncoding in interface JRFont

setPdfEncoding

public void setPdfEncoding(java.lang.String pdfEncoding)
Specified by:
setPdfEncoding in interface JRFont

isPdfEmbedded

public boolean isPdfEmbedded()
Specified by:
isPdfEmbedded in interface JRFont

isOwnPdfEmbedded

public java.lang.Boolean isOwnPdfEmbedded()
Specified by:
isOwnPdfEmbedded in interface JRFont

setPdfEmbedded

public void setPdfEmbedded(boolean isPdfEmbedded)
Specified by:
setPdfEmbedded in interface JRFont

setPdfEmbedded

public void setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.

Specified by:
setPdfEmbedded in interface JRFont

getDefaultLineColor

public java.awt.Color getDefaultLineColor()
Specified by:
getDefaultLineColor in interface JRBoxContainer

setHeight

public void setHeight(int height)
Overrides:
setHeight in class JRFillElement

setWidth

public void setWidth(int width)
Specified by:
setWidth in interface JRElement
Overrides:
setWidth in class JRFillElement

processMarkupText

protected java.lang.String processMarkupText(java.lang.String text)

getMarkupProcessor

protected MarkupProcessor getMarkupProcessor(java.lang.String markup)

setPrintText

protected void setPrintText(JRPrintText printText)

getTextTruncateSuffix

protected java.lang.String getTextTruncateSuffix()

setTextTruncateSuffix

protected void setTextTruncateSuffix(java.lang.String textTruncateSuffix)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com