Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine
Interface JRPrintText

All Superinterfaces:
  JRAlignment, JRBox, JRBoxContainer, JRCommonElement, JRCommonText, JRFont, JRPrintAnchor, JRPrintElement, JRPrintHyperlink, JRPropertiesHolder, JRStyleContainer

All Known Implementing Classes:
  JRBasePrintText, JRRecordedValuesPrintText, JRTemplatePrintText

    public interface JRPrintText

extends JRPrintElement, JRAlignment, JRPrintAnchor, JRPrintHyperlink, JRBox, JRFont, JRCommonText

Version:
  $Id: JRPrintText.java 3583 2010-03-12 11:35:40Z shertage $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
`static byte` | `RUN_DIRECTION_LTR` Deprecated. Replaced by `RunDirectionEnum.LTR`.
`static byte` | `RUN_DIRECTION_RTL` Deprecated. Replaced by `RunDirectionEnum.RTL`.
`static short[]` | `ZERO_LINE_BREAK_OFFSETS` Zero-length line break offset array used for `getLineBreakOffsets()` when the text does not have any line breaks.

Fields inherited from interface net.sf.jasperreports.engine.JRAlignment
`HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_TOP`

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`

Method Summary
`JRBox` | `getBox()` Deprecated. Replaced by `JRBoxContainer.getLineBox()`
`JRFont` | `getFont()` Deprecated.
`java.lang.String` | `getFormatFactoryClass()` Returns the name of the class implementing the `FormatFactory` interface to use with this text element, in case it is not the same as the one for the overall document.
`JRStyledText` | `getFullStyledText(JRStyledTextAttributeSelector attributeSelector)` Returns the full styled text of this object.
`java.lang.String` | `getFullText()` Returns the full (not truncated) text of this object.
`float` | `getLeadingOffset()`
`short[]` | `getLineBreakOffsets()` Returns the line break offsets for the text if saved during report fill.
`float` | `getLineSpacingFactor()`
`java.lang.String` | `getLocaleCode()` Returns the code of the `java.util.Locale` which was used while formatting the source value of the text.
`java.lang.String` | `getOriginalText()` Returns the original text that was set in this object.
`java.lang.Byte` | `getOwnLineSpacing()` Deprecated. Replaced by `getOwnLineSpacingValue()`.
`LineSpacingEnum` | `getOwnLineSpacingValue()` Gets the text own line spacing.
`java.lang.String` | `getOwnMarkup()`
`java.lang.Byte` | `getOwnRotation()` Deprecated. Replaced by `getOwnRotationValue()`.
`RotationEnum` | `getOwnRotationValue()` Gets the text own rotation.
`java.lang.String` | `getPattern()` Returns the pattern used to format a value that was the source of this text.
`byte` | `getRunDirection()` Deprecated. Replaced by `getRunDirectionValue()`.
`RunDirectionEnum` | `getRunDirectionValue()` Gets the text run direction.
`JRStyledText` | `getStyledText(JRStyledTextAttributeSelector attributeSelector)` Returns the styled text for this object.
`java.lang.String` | `getText()` Returns the possibly truncated (when `getTextTruncateIndex()` is not null) text of this object.
`byte` | `getTextAlignment()` Deprecated. Replaced by `JRAlignment.getHorizontalAlignment()`.
`float` | `getTextHeight()`
`java.lang.Integer` | `getTextTruncateIndex()` Returns the index to which this object's text is to be truncated.
`java.lang.String` | `getTextTruncateSuffix()` Returns the suffix that is to be appended to the truncated text (as returned by `getText()`.
`java.lang.String` | `getTimeZoneId()` Returns the `ID` of the `java.util.TimeZone` used to format this text's date source value.
`java.lang.String` | `getValueClassName()` Returns the type of the value which was used to generate this text.
`void` | `setBox(JRBox box)` Deprecated.
`void` | `setFont(JRFont font)` Deprecated.
`void` | `setLeadingOffset(float leadingOffset)`
`void` | `setLineBreakOffsets(short[] lineBreakOffsets)` Sets the line break offsets for the text.
`void` | `setLineSpacing(byte lineSpacing)` Deprecated. Replaced by `setLineSpacing(LineSpacingEnum)`.
`void` | `setLineSpacing(java.lang.Byte lineSpacing)` Deprecated. Replaced by `setLineSpacing(LineSpacingEnum)`.
`void` | `setLineSpacing(LineSpacingEnum lineSpacing)` Sets the text line spacing.
`void` | `setLineSpacingFactor(float lineSpacingFactor)`
`void` | `setMarkup(java.lang.String markup)`
`void` | `setRotation(byte rotation)` Deprecated. Replaced by `setRotation(RotationEnum)`.
`void` | `setRotation(java.lang.Byte rotation)` Deprecated. Replaced by `setRotation(RotationEnum)`.
`void` | `setRotation(RotationEnum rotationEnum)` Sets the text rotation.
`void` | `setRunDirection(byte rotation)` Deprecated. Replaced by `setRunDirection(RunDirectionEnum)`.
`void` | `setRunDirection(RunDirectionEnum runDirectionEnum)` Sets the text run direction.
`void` | `setStyledText(boolean isStyledText)` Deprecated. Replaced by `setMarkup(String)`
`void` | `setStyledText(java.lang.Boolean isStyledText)` Deprecated. Replaced by `setMarkup(String)`
`void` | `setText(java.lang.String text)` Set the text for this object.
`void` | `setTextAlignment(byte horizontalAlignment)` Deprecated. Replaced by `JRAlignment.setHorizontalAlignment(byte)`.
`void` | `setTextHeight(float textHeight)`
`void` | `setTextTruncateIndex(java.lang.Integer index)` Sets the index to which this object's text is to be truncated.
`void` | `setTextTruncateSuffix(java.lang.String suffix)` Sets the suffix to be appended to the truncated text.

Methods inherited from interface net.sf.jasperreports.engine.JRPrintElement
`accept, getHeight, getKey, getOrigin, getWidth, getX, getY, setHeight, setStyle, setWidth, setX, setY`

Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
`getParentProperties, getPropertiesMap, hasProperties`

Methods inherited from interface net.sf.jasperreports.engine.JRAlignment
`getHorizontalAlignment, getHorizontalAlignmentValue, getOwnHorizontalAlignment, getOwnHorizontalAlignmentValue, getOwnVerticalAlignment, getOwnVerticalAlignmentValue, getVerticalAlignment, getVerticalAlignmentValue, setHorizontalAlignment, setHorizontalAlignment, setHorizontalAlignment, setVerticalAlignment, setVerticalAlignment, setVerticalAlignment`

Methods inherited from interface net.sf.jasperreports.engine.JRPrintAnchor
`getAnchorName, getBookmarkLevel, setAnchorName, setBookmarkLevel`

Methods inherited from interface net.sf.jasperreports.engine.JRPrintHyperlink
`getHyperlinkAnchor, getHyperlinkPage, getHyperlinkParameters, getHyperlinkReference, getHyperlinkTarget, getHyperlinkTargetValue, getHyperlinkTooltip, getHyperlinkType, getHyperlinkTypeValue, getLinkTarget, getLinkType, setHyperlinkAnchor, setHyperlinkPage, setHyperlinkParameters, setHyperlinkReference, setHyperlinkTarget, setHyperlinkTarget, setHyperlinkTooltip, setHyperlinkType, setHyperlinkType, setLinkTarget, setLinkType`

Methods inherited from interface net.sf.jasperreports.engine.JRBox
`getBorder, getBorderColor, getBottomBorder, getBottomBorderColor, getBottomPadding, getLeftBorder, getLeftBorderColor, getLeftPadding, getOwnBorder, getOwnBorderColor, getOwnBottomBorder, getOwnBottomBorderColor, getOwnBottomPadding, getOwnLeftBorder, getOwnLeftBorderColor, getOwnLeftPadding, getOwnPadding, getOwnRightBorder, getOwnRightBorderColor, getOwnRightPadding, getOwnTopBorder, getOwnTopBorderColor, getOwnTopPadding, getPadding, getRightBorder, getRightBorderColor, getRightPadding, getTopBorder, getTopBorderColor, getTopPadding, setBorder, setBorder, setBorderColor, setBottomBorder, setBottomBorder, setBottomBorderColor, setBottomPadding, setBottomPadding, setLeftBorder, setLeftBorder, setLeftBorderColor, setLeftPadding, setLeftPadding, setPadding, setPadding, setRightBorder, setRightBorder, setRightBorderColor, setRightPadding, setRightPadding, setTopBorder, setTopBorder, setTopBorderColor, setTopPadding, setTopPadding`

Methods inherited from interface net.sf.jasperreports.engine.JRFont
`getFontName, getFontSize, getOwnFontName, getOwnFontSize, getOwnPdfEncoding, getOwnPdfFontName, getOwnSize, getPdfEncoding, getPdfFontName, getReportFont, getSize, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, setBold, setBold, setFontName, setFontSize, setFontSize, setItalic, setItalic, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setReportFont, setSize, setSize, setStrikeThrough, setStrikeThrough, setUnderline, setUnderline`

Methods inherited from interface net.sf.jasperreports.engine.JRCommonText
`getFontSize, getLineSpacing, getLineSpacingValue, getMarkup, getRotation, getRotationValue, isOwnStyledText, isStyledText`

Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
`getBackcolor, getForecolor, getMode, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnMode, getOwnModeValue, setBackcolor, setForecolor, setMode, setMode, setMode`

Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
`getDefaultLineColor, getLineBox`

Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
`getDefaultStyleProvider, getStyle, getStyleNameReference`

Field Detail

### ZERO_LINE_BREAK_OFFSETS

    static final short[] ZERO_LINE_BREAK_OFFSETS

  Zero-length line break offset array used for `getLineBreakOffsets()` when the text does not have any line breaks.

### RUN_DIRECTION_LTR

    static final byte RUN_DIRECTION_LTR

  Deprecated. Replaced by `RunDirectionEnum.LTR`.
  See Also:
    Constant Field Values

### RUN_DIRECTION_RTL

    static final byte RUN_DIRECTION_RTL

  Deprecated. Replaced by `RunDirectionEnum.RTL`.
  See Also:
    Constant Field Values

Method Detail

### getText

    java.lang.String getText()

  Returns the possibly truncated (when `getTextTruncateIndex()` is not null) text of this object.

  Returns:
    the text of this object
  See Also:
    `getFullText()`, `getTextTruncateSuffix()`

### setText

    void setText(java.lang.String text)

  Set the text for this object.

  Parameters:
    `text` - the text
  See Also:
    `setTextTruncateIndex(Integer)`

### getTextTruncateIndex

    java.lang.Integer getTextTruncateIndex()

  Returns the index to which this object's text is to be truncated. This index is usually set at report fill time when the engine is instructed to keep the full text in the print text object.

  Returns:
    the index to which this object's text is to be truncated
  See Also:
    `JRTextElement.PROPERTY_PRINT_KEEP_FULL_TEXT`, `getTextTruncateSuffix()`

### setTextTruncateIndex

    void setTextTruncateIndex(java.lang.Integer index)

  Sets the index to which this object's text is to be truncated. The test is truncated when `getText()` or `getStyledText(JRStyledTextAttributeSelector)` are called.

  Parameters:
    `index` - the index to which this object's text is to be truncated

### getTextTruncateSuffix

    java.lang.String getTextTruncateSuffix()

  Returns the suffix that is to be appended to the truncated text (as returned by `getText()`.

  Returns:
    the truncated text suffix
  See Also:
    `JRTextElement.PROPERTY_TRUNCATE_SUFFIX`

### setTextTruncateSuffix

    void setTextTruncateSuffix(java.lang.String suffix)

  Sets the suffix to be appended to the truncated text.

  Parameters:
    `suffix` - the suffix to be appended to the truncated text
  See Also:
    `getTextTruncateSuffix()`

### getFullText

    java.lang.String getFullText()

  Returns the full (not truncated) text of this object.

  Returns:
    the full text of this object
  See Also:
    `getText()`, `getTextTruncateIndex()`

### getOriginalText

    java.lang.String getOriginalText()

  Returns the original text that was set in this object.

  Returns:
    the original text

### getStyledText

    JRStyledText getStyledText(JRStyledTextAttributeSelector attributeSelector)

  Returns the styled text for this object. The text is truncated according to `getText()`.

  Parameters:
    `attributeSelector` - the styled text attribute selector
  Returns:
    the possibly truncated styled text for this object

### getFullStyledText

    JRStyledText getFullStyledText(JRStyledTextAttributeSelector attributeSelector)

  Returns the full styled text of this object.

  Parameters:
    `attributeSelector` - the styled text attribute selector
  Returns:
    the full styled text of this object
  See Also:
    `getFullText()`

### getLineSpacingFactor

    float getLineSpacingFactor()

### setLineSpacingFactor

    void setLineSpacingFactor(float lineSpacingFactor)

### getLeadingOffset

    float getLeadingOffset()

### setLeadingOffset

    void setLeadingOffset(float leadingOffset)

### getTextAlignment

    byte getTextAlignment()

  Deprecated. Replaced by `JRAlignment.getHorizontalAlignment()`.

### setTextAlignment

    void setTextAlignment(byte horizontalAlignment)

  Deprecated. Replaced by `JRAlignment.setHorizontalAlignment(byte)`.

### getOwnRotation

    java.lang.Byte getOwnRotation()

  Deprecated. Replaced by `getOwnRotationValue()`.

  Specified by:
    `getOwnRotation` in interface `JRCommonText`

### setRotation

    void setRotation(byte rotation)

  Deprecated. Replaced by `setRotation(RotationEnum)`.

  Specified by:
    `setRotation` in interface `JRCommonText`

### setRotation

    void setRotation(java.lang.Byte rotation)

  Deprecated. Replaced by `setRotation(RotationEnum)`.

  Specified by:
    `setRotation` in interface `JRCommonText`

### getOwnRotationValue

    RotationEnum getOwnRotationValue()

  Gets the text own rotation.

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

### setRotation

    void setRotation(RotationEnum rotationEnum)

  Sets the text rotation.

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

### getRunDirection

    byte getRunDirection()

  Deprecated. Replaced by `getRunDirectionValue()`.

### setRunDirection

    void setRunDirection(byte rotation)

  Deprecated. Replaced by `setRunDirection(RunDirectionEnum)`.

### getRunDirectionValue

    RunDirectionEnum getRunDirectionValue()

  Gets the text run direction.

  Returns:
    a value representing one of the run direction constants in `RunDirectionEnum`

### setRunDirection

    void setRunDirection(RunDirectionEnum runDirectionEnum)

  Sets the text run direction.

  Parameters:
    `runDirectionEnum` - a value representing one of the text run direction constants in `RunDirectionEnum`

### getTextHeight

    float getTextHeight()

### setTextHeight

    void setTextHeight(float textHeight)

### getOwnLineSpacing

    java.lang.Byte getOwnLineSpacing()

  Deprecated. Replaced by `getOwnLineSpacingValue()`.

  Specified by:
    `getOwnLineSpacing` in interface `JRCommonText`

### setLineSpacing

    void setLineSpacing(byte lineSpacing)

  Deprecated. Replaced by `setLineSpacing(LineSpacingEnum)`.

  Specified by:
    `setLineSpacing` in interface `JRCommonText`

### setLineSpacing

    void setLineSpacing(java.lang.Byte lineSpacing)

  Deprecated. Replaced by `setLineSpacing(LineSpacingEnum)`.

  Specified by:
    `setLineSpacing` in interface `JRCommonText`

### getOwnLineSpacingValue

    LineSpacingEnum getOwnLineSpacingValue()

  Description copied from interface: `JRCommonText`
  Gets the text own line spacing.

  Specified by:
    `getOwnLineSpacingValue` in interface `JRCommonText`
  Returns:
    a value representing one of the line spacing constants in `LineSpacingEnum`

### setLineSpacing

    void setLineSpacing(LineSpacingEnum lineSpacing)

  Description copied from interface: `JRCommonText`
  Sets the text line spacing.

  Specified by:
    `setLineSpacing` in interface `JRCommonText`
  Parameters:
    `lineSpacing` - a value representing one of the line spacing constants in `LineSpacingEnum`

### setStyledText

    void setStyledText(boolean isStyledText)

  Deprecated. Replaced by `setMarkup(String)`

### setStyledText

    void setStyledText(java.lang.Boolean isStyledText)

  Deprecated. Replaced by `setMarkup(String)`

### getOwnMarkup

    java.lang.String getOwnMarkup()

  Specified by:
    `getOwnMarkup` in interface `JRCommonText`

### setMarkup

    void setMarkup(java.lang.String markup)

  Specified by:
    `setMarkup` in interface `JRCommonText`

### getBox

    JRBox getBox()

  Deprecated. Replaced by `JRBoxContainer.getLineBox()`

### setBox

    void setBox(JRBox box)

  Deprecated.

### getFont

    JRFont getFont()

  Deprecated.

### setFont

    void setFont(JRFont font)

  Deprecated.

### getValueClassName

    java.lang.String getValueClassName()

  Returns the type of the value which was used to generate this text.

  `Text fields` that have a non-`String` expression save the value type using this attribute. This information can be used by exporters to treat numerical or date texts (for instance) in a special manner.

  Returns:
    the type of the original value used to generate the text

### getPattern

    java.lang.String getPattern()

  Returns the pattern used to format a value that was the source of this text.

  The pattern can be used to parse the text back to its source value.

  Returns:
    the pattern used to format this text's source value
  See Also:
    `getValueClassName()`

### getFormatFactoryClass

    java.lang.String getFormatFactoryClass()

  Returns the name of the class implementing the `FormatFactory` interface to use with this text element, in case it is not the same as the one for the overall document.

### getLocaleCode

    java.lang.String getLocaleCode()

  Returns the code of the `java.util.Locale` which was used while formatting the source value of the text.

  The code is created using the `java.util.Locale.toString()` convention.

  When this attribute is null, the locale returned by `JasperPrint.getLocaleCode()` is used. This way, the locale is specified in a single place when all the (or many ) texts from a print object were formatted using the same locale.

  Returns:
    the code of the `java.util.Locale` used when formatting this text's source value

### getTimeZoneId

    java.lang.String getTimeZoneId()

  Returns the `ID` of the `java.util.TimeZone` used to format this text's date source value.

  When this attribute is null, the time zone returned by `JasperPrint.getTimeZoneId()` is used.

  Returns:
    the `ID` of the `java.util.TimeZone` used to format this text's date source value

### getLineBreakOffsets

    short[] getLineBreakOffsets()

  Returns the line break offsets for the text if saved during report fill.

  The array of offsets is incremental, each offset adds to the previous value. I.e. the positions at which line breaks occur are `offset[0]`, `offset[0] + offset[1]`, `offset[0] + offset[1] + offset[2]` and so on.

  This array does not include positions for explicit line breaks in the text, i.e. for line breaks that occur due to new line characters in the text. The array only includes line break positions within a paragraph in the text.

  If the text was meant to have saved line break offsets but no (non explicit) breaks were detected (e.g. if the text is a single line), this method will return a zero-length array. If the text was not meant to include saved line breaks, the method will return `null`.

  Returns:
    the line break offsets (possibly zero-length array), or `null` if no line break positions were saved during the fill
  See Also:
    `JRTextElement.PROPERTY_SAVE_LINE_BREAKS`

### setLineBreakOffsets

    void setLineBreakOffsets(short[] lineBreakOffsets)

  Sets the line break offsets for the text.

  Parameters:
    `lineBreakOffsets` - the line break offsets
  See Also:
    `getLineBreakOffsets()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com