Class JRBasePrintText
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBasePrintElement
-
- net.sf.jasperreports.engine.base.JRBasePrintText
-
- All Implemented Interfaces:
java.io.Serializable,TextFormat,JRBoxContainer,JRCommonElement,JRCommonText,JRFont,JRIdentifiable,JRParagraphContainer,JRPrintAnchor,JRPrintElement,JRPrintHyperlink,JRPrintText,JRPropertiesHolder,JRStyleContainer,JRTextAlignment
public class JRBasePrintText extends JRBasePrintElement implements JRPrintText
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringanchorNameprotected intbookmarkLevelThe bookmark level for the anchor associated with this field.protected java.lang.StringfontNameprotected java.lang.Floatfontsizeprotected java.lang.StringformatFactoryClassprotected HorizontalTextAlignEnumhorizontalTextAlignprotected java.lang.StringhyperlinkAnchorprotected java.lang.IntegerhyperlinkPageprotected JRPrintHyperlinkParametershyperlinkParametersprotected java.lang.StringhyperlinkReferenceprotected java.lang.StringhyperlinkTooltipprotected java.lang.BooleanisBoldprotected java.lang.BooleanisItalicprotected java.lang.BooleanisPdfEmbeddedprotected java.lang.BooleanisStrikeThroughprotected java.lang.BooleanisUnderlineprotected floatleadingOffsetprotected JRLineBoxlineBoxprotected short[]lineBreakOffsetsprotected floatlineSpacingFactorprotected java.lang.StringlinkTargetprotected java.lang.StringlinkTypeprotected java.lang.StringlocaleCodeprotected java.lang.Stringmarkupprotected JRParagraphparagraphprotected java.lang.Stringpatternprotected java.lang.StringpdfEncodingprotected java.lang.StringpdfFontNameprotected RotationEnumrotationValueprotected RunDirectionEnumrunDirectionValueprotected java.lang.Stringtextprotected TextFormattextFormatprotected floattextHeightprotected java.lang.IntegertextTruncateIndexprotected java.lang.StringtextTruncateSuffixprotected java.lang.StringtimeZoneIdprotected java.lang.Objectvalueprotected java.lang.StringvalueClassNameprotected VerticalTextAlignEnumverticalTextAlign-
Fields inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
backcolor, defaultStyleProvider, forecolor, height, key, modeValue, origin, style, uuid, width, x, y
-
Fields inherited from interface net.sf.jasperreports.engine.JRCommonText
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXT
-
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.JRPrintElement
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
-
Fields inherited from interface net.sf.jasperreports.engine.JRPrintHyperlink
PROPERTY_IGNORE_HYPERLINK_SUFFIX
-
Fields inherited from interface net.sf.jasperreports.engine.JRPrintText
PROPERTY_AWT_INDENT_FIRST_LINE, PROPERTY_AWT_JUSTIFY_LAST_LINE, ZERO_LINE_BREAK_OFFSETS
-
-
Constructor Summary
Constructors Constructor Description JRBasePrintText(JRDefaultStyleProvider defaultStyleProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidaccept(PrintElementVisitor<T> visitor, T arg)Accepts a print element visitor.voidaddHyperlinkParameter(JRPrintHyperlinkParameter parameter)Adds a custom hyperlink parameter.voidcopyBox(JRLineBox lineBox)voidcopyParagraph(JRParagraph paragraph)java.lang.StringgetAnchorName()intgetBookmarkLevel()Returns the level of the bookmark corresponding to the anchor.java.awt.ColorgetDefaultLineColor()java.lang.StringgetFontName()floatgetFontsize()java.lang.StringgetFormatFactoryClass()Returns the name of the class implementing theFormatFactoryinterface to use with this text element, in case it is not the same as the one for the overall document.JRStyledTextgetFullStyledText(JRStyledTextAttributeSelector attributeSelector)Returns the full styled text of this object.java.lang.StringgetFullText()Returns the full (not truncated) text of this object.HorizontalTextAlignEnumgetHorizontalTextAlign()Gets the text horizontal alignment.java.lang.StringgetHyperlinkAnchor()java.lang.IntegergetHyperlinkPage()JRPrintHyperlinkParametersgetHyperlinkParameters()Returns the set of custom hyperlink parameters.java.lang.StringgetHyperlinkReference()HyperlinkTargetEnumgetHyperlinkTargetValue()java.lang.StringgetHyperlinkTooltip()Returns the hyperlink tooltip.HyperlinkTypeEnumgetHyperlinkTypeValue()Retrieves the hyperlink type for the element.floatgetLeadingOffset()JRLineBoxgetLineBox()short[]getLineBreakOffsets()Returns the line break offsets for the text if saved during report fill.floatgetLineSpacingFactor()java.lang.StringgetLinkTarget()Returns the hyperlink target name.java.lang.StringgetLinkType()Returns the hyperlink type.java.lang.StringgetLocaleCode()Returns the code of thejava.util.Localewhich was used while formatting the source value of the text.java.lang.StringgetMarkup()Returns the text markup.ModeEnumgetModeValue()Returns the element transparency mode.java.lang.StringgetOriginalText()Returns the original text that was set in this object.java.lang.StringgetOwnFontName()java.lang.FloatgetOwnFontsize()HorizontalTextAlignEnumgetOwnHorizontalTextAlign()java.lang.StringgetOwnMarkup()java.lang.StringgetOwnPdfEncoding()java.lang.StringgetOwnPdfFontName()RotationEnumgetOwnRotationValue()Gets the text own rotation.VerticalTextAlignEnumgetOwnVerticalTextAlign()JRParagraphgetParagraph()java.lang.StringgetPattern()Returns the pattern used to format a value that was the source of this text.java.lang.StringgetPdfEncoding()java.lang.StringgetPdfFontName()RotationEnumgetRotationValue()Gets the text rotation.RunDirectionEnumgetRunDirectionValue()Gets the text run direction.floatgetTextHeight()java.lang.IntegergetTextTruncateIndex()Returns the index to which this object's text is to be truncated.java.lang.StringgetTextTruncateSuffix()Returns the suffix that is to be appended to the truncated text (as returned byJRStyledTextUtil.getTruncatedText(JRPrintText).java.lang.StringgetTimeZoneId()Returns theIDof thejava.util.TimeZoneused to format this text's date source value.java.lang.ObjectgetValue()java.lang.StringgetValueClassName()Returns the type of the value which was used to generate this text.VerticalTextAlignEnumgetVerticalTextAlign()Gets the text vertical alignment.booleanisBold()booleanisItalic()java.lang.BooleanisOwnBold()java.lang.BooleanisOwnItalic()java.lang.BooleanisOwnPdfEmbedded()java.lang.BooleanisOwnStrikeThrough()java.lang.BooleanisOwnUnderline()booleanisPdfEmbedded()booleanisStrikeThrough()booleanisUnderline()voidsetAnchorName(java.lang.String anchorName)voidsetBold(java.lang.Boolean isBold)Alternative setBold method which allows also to reset the "own" isBold property.voidsetBookmarkLevel(int bookmarkLevel)Sets the boomark level for the anchor.voidsetFont(JRFont font)voidsetFontName(java.lang.String fontName)voidsetFontSize(java.lang.Float fontSize)Method which allows also to reset the "own" size property.voidsetFormatFactoryClass(java.lang.String formatFactoryClass)voidsetHorizontalTextAlign(HorizontalTextAlignEnum horizontalTextAlign)Sets the text horizontal alignment.voidsetHyperlinkAnchor(java.lang.String hyperlinkAnchor)voidsetHyperlinkPage(java.lang.Integer hyperlinkPage)voidsetHyperlinkPage(java.lang.String hyperlinkPage)voidsetHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)Sets the custom hyperlink parameters.voidsetHyperlinkReference(java.lang.String hyperlinkReference)voidsetHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)voidsetHyperlinkTooltip(java.lang.String hyperlinkTooltip)Sets the tooltip to be used for the hyperlink.voidsetHyperlinkType(HyperlinkTypeEnum hyperlinkType)Sets the link type as a built-in hyperlink type.voidsetItalic(java.lang.Boolean isItalic)Alternative setItalic method which allows also to reset the "own" isItalic property.voidsetLeadingOffset(float leadingOffset)voidsetLineBreakOffsets(short[] lineBreakOffsets)Sets the line break offsets for the text.voidsetLineSpacingFactor(float lineSpacingFactor)voidsetLinkTarget(java.lang.String linkTarget)Sets the hyperlink target name.voidsetLinkType(java.lang.String linkType)Sets the hyperlink type.voidsetLocaleCode(java.lang.String localeCode)voidsetMarkup(java.lang.String markup)voidsetPattern(java.lang.String pattern)voidsetPdfEmbedded(java.lang.Boolean isPdfEmbedded)Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.voidsetPdfEncoding(java.lang.String pdfEncoding)voidsetPdfFontName(java.lang.String pdfFontName)voidsetRotation(RotationEnum rotationValue)Sets the text rotation.voidsetRunDirection(RunDirectionEnum runDirectionValue)Sets the text run direction.voidsetStrikeThrough(java.lang.Boolean isStrikeThrough)Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.voidsetText(java.lang.String text)Set the text for this object.voidsetTextFormat(TextFormat textFormat)voidsetTextHeight(float textHeight)voidsetTextTruncateIndex(java.lang.Integer textTruncateIndex)Sets the index to which this object's text is to be truncated.voidsetTextTruncateSuffix(java.lang.String textTruncateSuffix)Sets the suffix to be appended to the truncated text.voidsetTimeZoneId(java.lang.String timeZoneId)voidsetUnderline(java.lang.Boolean isUnderline)Alternative setUnderline method which allows also to reset the "own" isUnderline property.voidsetValue(java.lang.Object value)voidsetValueClassName(java.lang.String valueClassName)voidsetVerticalTextAlign(VerticalTextAlignEnum verticalTextAlign)Gets the text vertical alignment.-
Methods inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setKey, setMode, setOrigin, setPrintElementId, setSourceElementId, setStyle, setUUID, setWidth, setX, setY
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getOwnBackcolor, getOwnForecolor, getOwnModeValue, setBackcolor, setForecolor, setMode
-
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
-
Methods inherited from interface net.sf.jasperreports.engine.JRPrintElement
getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setY
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
-
-
-
-
Field Detail
-
text
protected java.lang.String text
-
textTruncateIndex
protected java.lang.Integer textTruncateIndex
-
lineBreakOffsets
protected short[] lineBreakOffsets
-
textTruncateSuffix
protected java.lang.String textTruncateSuffix
-
value
protected java.lang.Object value
-
lineSpacingFactor
protected float lineSpacingFactor
-
leadingOffset
protected float leadingOffset
-
horizontalTextAlign
protected HorizontalTextAlignEnum horizontalTextAlign
-
verticalTextAlign
protected VerticalTextAlignEnum verticalTextAlign
-
rotationValue
protected RotationEnum rotationValue
-
runDirectionValue
protected RunDirectionEnum runDirectionValue
-
textHeight
protected float textHeight
-
markup
protected java.lang.String markup
-
textFormat
protected TextFormat textFormat
-
anchorName
protected java.lang.String anchorName
-
linkType
protected java.lang.String linkType
-
linkTarget
protected java.lang.String linkTarget
-
hyperlinkReference
protected java.lang.String hyperlinkReference
-
hyperlinkAnchor
protected java.lang.String hyperlinkAnchor
-
hyperlinkPage
protected java.lang.Integer hyperlinkPage
-
hyperlinkTooltip
protected java.lang.String hyperlinkTooltip
-
hyperlinkParameters
protected JRPrintHyperlinkParameters hyperlinkParameters
-
bookmarkLevel
protected int bookmarkLevel
The bookmark level for the anchor associated with this field.- See Also:
JRAnchor.getBookmarkLevel()
-
lineBox
protected JRLineBox lineBox
-
paragraph
protected JRParagraph paragraph
-
fontName
protected java.lang.String fontName
-
isBold
protected java.lang.Boolean isBold
-
isItalic
protected java.lang.Boolean isItalic
-
isUnderline
protected java.lang.Boolean isUnderline
-
isStrikeThrough
protected java.lang.Boolean isStrikeThrough
-
fontsize
protected java.lang.Float fontsize
-
pdfFontName
protected java.lang.String pdfFontName
-
pdfEncoding
protected java.lang.String pdfEncoding
-
isPdfEmbedded
protected java.lang.Boolean isPdfEmbedded
-
valueClassName
protected java.lang.String valueClassName
-
pattern
protected java.lang.String pattern
-
formatFactoryClass
protected java.lang.String formatFactoryClass
-
localeCode
protected java.lang.String localeCode
-
timeZoneId
protected java.lang.String timeZoneId
-
-
Constructor Detail
-
JRBasePrintText
public JRBasePrintText(JRDefaultStyleProvider defaultStyleProvider)
-
-
Method Detail
-
getModeValue
public ModeEnum getModeValue()
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:
getModeValuein interfaceJRCommonElement- Overrides:
getModeValuein classJRBasePrintElement
-
setText
public void setText(java.lang.String text)
Description copied from interface:JRPrintTextSet the text for this object.- Specified by:
setTextin interfaceJRPrintText- Parameters:
text- the text- See Also:
JRPrintText.setTextTruncateIndex(Integer)
-
getTextTruncateIndex
public java.lang.Integer getTextTruncateIndex()
Description copied from interface:JRPrintTextReturns 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.- Specified by:
getTextTruncateIndexin interfaceJRPrintText- Returns:
- the index to which this object's text is to be truncated
- See Also:
JRTextElement.PROPERTY_PRINT_KEEP_FULL_TEXT,JRPrintText.getTextTruncateSuffix()
-
setTextTruncateIndex
public void setTextTruncateIndex(java.lang.Integer textTruncateIndex)
Description copied from interface:JRPrintTextSets the index to which this object's text is to be truncated. The text is truncated whenJRStyledTextUtil.getTruncatedText(JRPrintText)orJRPrintText.getFullStyledText(JRStyledTextAttributeSelector)are called.- Specified by:
setTextTruncateIndexin interfaceJRPrintText- Parameters:
textTruncateIndex- the index to which this object's text is to be truncated
-
getTextTruncateSuffix
public java.lang.String getTextTruncateSuffix()
Description copied from interface:JRPrintTextReturns the suffix that is to be appended to the truncated text (as returned byJRStyledTextUtil.getTruncatedText(JRPrintText).- Specified by:
getTextTruncateSuffixin interfaceJRPrintText- Returns:
- the truncated text suffix
- See Also:
JRTextElement.PROPERTY_TRUNCATE_SUFFIX
-
setTextTruncateSuffix
public void setTextTruncateSuffix(java.lang.String textTruncateSuffix)
Description copied from interface:JRPrintTextSets the suffix to be appended to the truncated text.- Specified by:
setTextTruncateSuffixin interfaceJRPrintText- Parameters:
textTruncateSuffix- the suffix to be appended to the truncated text- See Also:
JRPrintText.getTextTruncateSuffix()
-
getLineBreakOffsets
public short[] getLineBreakOffsets()
Description copied from interface:JRPrintTextReturns 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.- Specified by:
getLineBreakOffsetsin interfaceJRPrintText- Returns:
- the line break offsets (possibly zero-length array), or
nullif no line break positions were saved during the fill - See Also:
JRTextElement.PROPERTY_SAVE_LINE_BREAKS
-
setLineBreakOffsets
public void setLineBreakOffsets(short[] lineBreakOffsets)
Description copied from interface:JRPrintTextSets the line break offsets for the text.- Specified by:
setLineBreakOffsetsin interfaceJRPrintText- Parameters:
lineBreakOffsets- the line break offsets- See Also:
JRPrintText.getLineBreakOffsets()
-
getFullText
public java.lang.String getFullText()
Description copied from interface:JRPrintTextReturns the full (not truncated) text of this object.- Specified by:
getFullTextin interfaceJRPrintText- Returns:
- the full text of this object
- See Also:
JRStyledTextUtil.getTruncatedText(JRPrintText),JRPrintText.getTextTruncateIndex()
-
getOriginalText
public java.lang.String getOriginalText()
Description copied from interface:JRPrintTextReturns the original text that was set in this object.- Specified by:
getOriginalTextin interfaceJRPrintText- Returns:
- the original text
-
getFullStyledText
public JRStyledText getFullStyledText(JRStyledTextAttributeSelector attributeSelector)
Description copied from interface:JRPrintTextReturns the full styled text of this object.- Specified by:
getFullStyledTextin interfaceJRPrintText- Parameters:
attributeSelector- the styled text attribute selector- Returns:
- the full styled text of this object
- See Also:
JRPrintText.getFullText()
-
getValue
public java.lang.Object getValue()
- Specified by:
getValuein interfaceJRPrintText
-
setValue
public void setValue(java.lang.Object value)
- Specified by:
setValuein interfaceJRPrintText
-
getLineSpacingFactor
public float getLineSpacingFactor()
- Specified by:
getLineSpacingFactorin interfaceJRPrintText
-
setLineSpacingFactor
public void setLineSpacingFactor(float lineSpacingFactor)
- Specified by:
setLineSpacingFactorin interfaceJRPrintText
-
getLeadingOffset
public float getLeadingOffset()
- Specified by:
getLeadingOffsetin interfaceJRPrintText
-
setLeadingOffset
public void setLeadingOffset(float leadingOffset)
- Specified by:
setLeadingOffsetin interfaceJRPrintText
-
getHorizontalTextAlign
public HorizontalTextAlignEnum 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
public HorizontalTextAlignEnum getOwnHorizontalTextAlign()
- Specified by:
getOwnHorizontalTextAlignin interfaceJRTextAlignment
-
setHorizontalTextAlign
public void setHorizontalTextAlign(HorizontalTextAlignEnum horizontalTextAlign)
Description copied from interface:JRTextAlignmentSets the text horizontal alignment.- Specified by:
setHorizontalTextAlignin interfaceJRTextAlignment- Parameters:
horizontalTextAlign- a value representing one of the horizontal text alignment constants inHorizontalTextAlignEnum
-
getVerticalTextAlign
public VerticalTextAlignEnum 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
public VerticalTextAlignEnum getOwnVerticalTextAlign()
- Specified by:
getOwnVerticalTextAlignin interfaceJRTextAlignment
-
setVerticalTextAlign
public void setVerticalTextAlign(VerticalTextAlignEnum verticalTextAlign)
Description copied from interface:JRTextAlignmentGets the text vertical alignment.- Specified by:
setVerticalTextAlignin interfaceJRTextAlignment- Parameters:
verticalTextAlign- a value representing one of the vertical text alignment constants inVerticalTextAlignEnum
-
getRotationValue
public RotationEnum getRotationValue()
Description copied from interface:JRCommonTextGets the text rotation.- Specified by:
getRotationValuein interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
getOwnRotationValue
public RotationEnum getOwnRotationValue()
Description copied from interface:JRCommonTextGets the text own rotation.- Specified by:
getOwnRotationValuein interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
setRotation
public void setRotation(RotationEnum rotationValue)
Description copied from interface:JRCommonTextSets the text rotation.- Specified by:
setRotationin interfaceJRCommonText- Parameters:
rotationValue- a value representing one of the text rotation constants inRotationEnum
-
getRunDirectionValue
public RunDirectionEnum getRunDirectionValue()
Description copied from interface:JRPrintTextGets the text run direction.- Specified by:
getRunDirectionValuein interfaceJRPrintText- Returns:
- a value representing one of the run direction constants in
RunDirectionEnum
-
setRunDirection
public void setRunDirection(RunDirectionEnum runDirectionValue)
Description copied from interface:JRPrintTextSets the text run direction.- Specified by:
setRunDirectionin interfaceJRPrintText- Parameters:
runDirectionValue- a value representing one of the text run direction constants inRunDirectionEnum
-
getTextHeight
public float getTextHeight()
- Specified by:
getTextHeightin interfaceJRPrintText
-
setTextHeight
public void setTextHeight(float textHeight)
- Specified by:
setTextHeightin interfaceJRPrintText
-
getMarkup
public java.lang.String getMarkup()
Description copied from interface:JRCommonTextReturns the text markup.- Specified by:
getMarkupin interfaceJRCommonText
-
getOwnMarkup
public java.lang.String getOwnMarkup()
- Specified by:
getOwnMarkupin interfaceJRCommonText
-
setMarkup
public void setMarkup(java.lang.String markup)
- Specified by:
setMarkupin interfaceJRCommonText
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getParagraph
public JRParagraph getParagraph()
- Specified by:
getParagraphin interfaceJRParagraphContainer
-
copyBox
public void copyBox(JRLineBox lineBox)
-
copyParagraph
public void copyParagraph(JRParagraph paragraph)
-
setFont
public void setFont(JRFont font)
-
setTextFormat
public void setTextFormat(TextFormat textFormat)
- Specified by:
setTextFormatin interfaceJRPrintText
-
getAnchorName
public java.lang.String getAnchorName()
- Specified by:
getAnchorNamein interfaceJRPrintAnchor
-
setAnchorName
public void setAnchorName(java.lang.String anchorName)
- Specified by:
setAnchorNamein interfaceJRPrintAnchor
-
getHyperlinkTypeValue
public HyperlinkTypeEnum getHyperlinkTypeValue()
Description copied from interface:JRPrintHyperlinkRetrieves the hyperlink type for the element.The actual hyperlink type is determined by
getLinkType(). This method can is used to determine whether the hyperlink type is one of the built-in types or a custom type. When hyperlink is of custom type,CUSTOMis returned.- Specified by:
getHyperlinkTypeValuein interfaceJRPrintHyperlink- Returns:
- one of the hyperlink type constants
- See Also:
JRPrintHyperlink.getLinkType()
-
setHyperlinkType
public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
Description copied from interface:JRPrintHyperlinkSets the link type as a built-in hyperlink type.- Specified by:
setHyperlinkTypein interfaceJRPrintHyperlink- Parameters:
hyperlinkType- the built-in hyperlink type- See Also:
JRPrintHyperlink.getLinkType()
-
getHyperlinkTargetValue
public HyperlinkTargetEnum getHyperlinkTargetValue()
- Specified by:
getHyperlinkTargetValuein interfaceJRPrintHyperlink
-
setHyperlinkTarget
public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
- Specified by:
setHyperlinkTargetin interfaceJRPrintHyperlink
-
getHyperlinkReference
public java.lang.String getHyperlinkReference()
- Specified by:
getHyperlinkReferencein interfaceJRPrintHyperlink
-
setHyperlinkReference
public void setHyperlinkReference(java.lang.String hyperlinkReference)
- Specified by:
setHyperlinkReferencein interfaceJRPrintHyperlink
-
getHyperlinkAnchor
public java.lang.String getHyperlinkAnchor()
- Specified by:
getHyperlinkAnchorin interfaceJRPrintHyperlink
-
setHyperlinkAnchor
public void setHyperlinkAnchor(java.lang.String hyperlinkAnchor)
- Specified by:
setHyperlinkAnchorin interfaceJRPrintHyperlink
-
getHyperlinkPage
public java.lang.Integer getHyperlinkPage()
- Specified by:
getHyperlinkPagein interfaceJRPrintHyperlink
-
setHyperlinkPage
public void setHyperlinkPage(java.lang.Integer hyperlinkPage)
- Specified by:
setHyperlinkPagein interfaceJRPrintHyperlink
-
setHyperlinkPage
public void setHyperlinkPage(java.lang.String hyperlinkPage)
-
getBookmarkLevel
public int getBookmarkLevel()
Description copied from interface:JRPrintAnchorReturns the level of the bookmark corresponding to the anchor.- Specified by:
getBookmarkLevelin interfaceJRPrintAnchor- Returns:
- the level of the bookmark corresponding to the anchor (starting from 1)
or
NO_BOOKMARKif no bookmark should be created for this anchor
-
setBookmarkLevel
public void setBookmarkLevel(int bookmarkLevel)
Description copied from interface:JRPrintAnchorSets the boomark level for the anchor.- Specified by:
setBookmarkLevelin interfaceJRPrintAnchor- Parameters:
bookmarkLevel- the bookmark level (starting from 1) orNO_BOOKMARKif no bookmark should be created
-
getFontName
public java.lang.String getFontName()
- Specified by:
getFontNamein interfaceJRFont
-
getOwnFontName
public java.lang.String getOwnFontName()
- Specified by:
getOwnFontNamein interfaceJRFont
-
setFontName
public void setFontName(java.lang.String fontName)
- Specified by:
setFontNamein interfaceJRFont
-
setBold
public void setBold(java.lang.Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.
-
isOwnItalic
public java.lang.Boolean isOwnItalic()
- Specified by:
isOwnItalicin interfaceJRFont
-
setItalic
public void setItalic(java.lang.Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.
-
isUnderline
public boolean isUnderline()
- Specified by:
isUnderlinein interfaceJRFont
-
isOwnUnderline
public java.lang.Boolean isOwnUnderline()
- Specified by:
isOwnUnderlinein interfaceJRFont
-
setUnderline
public void setUnderline(java.lang.Boolean isUnderline)
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
public java.lang.Boolean isOwnStrikeThrough()
- Specified by:
isOwnStrikeThroughin interfaceJRFont
-
setStrikeThrough
public void setStrikeThrough(java.lang.Boolean isStrikeThrough)
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
public java.lang.Float getOwnFontsize()
- Specified by:
getOwnFontsizein interfaceJRFont
-
setFontSize
public void setFontSize(java.lang.Float fontSize)
Method which allows also to reset the "own" size property.- Specified by:
setFontSizein interfaceJRFont
-
getPdfFontName
public java.lang.String getPdfFontName()
- Specified by:
getPdfFontNamein interfaceJRFont
-
getOwnPdfFontName
public java.lang.String getOwnPdfFontName()
- Specified by:
getOwnPdfFontNamein interfaceJRFont
-
setPdfFontName
public void setPdfFontName(java.lang.String pdfFontName)
- Specified by:
setPdfFontNamein interfaceJRFont
-
getPdfEncoding
public java.lang.String getPdfEncoding()
- Specified by:
getPdfEncodingin interfaceJRFont
-
getOwnPdfEncoding
public java.lang.String getOwnPdfEncoding()
- Specified by:
getOwnPdfEncodingin interfaceJRFont
-
setPdfEncoding
public void setPdfEncoding(java.lang.String pdfEncoding)
- Specified by:
setPdfEncodingin interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()
- Specified by:
isPdfEmbeddedin interfaceJRFont
-
isOwnPdfEmbedded
public java.lang.Boolean isOwnPdfEmbedded()
- Specified by:
isOwnPdfEmbeddedin interfaceJRFont
-
setPdfEmbedded
public void setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbeddedin interfaceJRFont
-
getPattern
public java.lang.String getPattern()
Description copied from interface:JRPrintTextReturns 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.
- Specified by:
getPatternin interfaceJRPrintText- Specified by:
getPatternin interfaceTextFormat- Returns:
- the pattern used to format this text's source value
- See Also:
JRPrintText.getValueClassName()
-
setPattern
public void setPattern(java.lang.String pattern)
-
getValueClassName
public java.lang.String getValueClassName()
Description copied from interface:JRPrintTextReturns the type of the value which was used to generate this text.Text fieldsthat have a non-Stringexpression 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.- Specified by:
getValueClassNamein interfaceJRPrintText- Specified by:
getValueClassNamein interfaceTextFormat- Returns:
- the type of the original value used to generate the text
-
setValueClassName
public void setValueClassName(java.lang.String valueClassName)
-
getFormatFactoryClass
public java.lang.String getFormatFactoryClass()
Description copied from interface:JRPrintTextReturns the name of the class implementing theFormatFactoryinterface to use with this text element, in case it is not the same as the one for the overall document.- Specified by:
getFormatFactoryClassin interfaceJRPrintText- Specified by:
getFormatFactoryClassin interfaceTextFormat
-
setFormatFactoryClass
public void setFormatFactoryClass(java.lang.String formatFactoryClass)
-
getLocaleCode
public java.lang.String getLocaleCode()
Description copied from interface:JRPrintTextReturns the code of thejava.util.Localewhich 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.- Specified by:
getLocaleCodein interfaceJRPrintText- Specified by:
getLocaleCodein interfaceTextFormat- Returns:
- the code of the
java.util.Localeused when formatting this text's source value
-
setLocaleCode
public void setLocaleCode(java.lang.String localeCode)
-
getTimeZoneId
public java.lang.String getTimeZoneId()
Description copied from interface:JRPrintTextReturns theIDof thejava.util.TimeZoneused to format this text's date source value.When this attribute is null, the time zone returned by
JasperPrint.getTimeZoneId()is used.- Specified by:
getTimeZoneIdin interfaceJRPrintText- Specified by:
getTimeZoneIdin interfaceTextFormat- Returns:
- the
IDof thejava.util.TimeZoneused to format this text's date source value
-
setTimeZoneId
public void setTimeZoneId(java.lang.String timeZoneId)
-
getHyperlinkParameters
public JRPrintHyperlinkParameters getHyperlinkParameters()
Description copied from interface:JRPrintHyperlinkReturns the set of custom hyperlink parameters.- Specified by:
getHyperlinkParametersin interfaceJRPrintHyperlink- Returns:
- the set of custom hyperlink parameters
- See Also:
JRPrintHyperlink.setHyperlinkParameters(JRPrintHyperlinkParameters),JRPrintHyperlinkParameter
-
setHyperlinkParameters
public void setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)
Description copied from interface:JRPrintHyperlinkSets the custom hyperlink parameters.These parameters will be used to produce the actual hyperlink when the report is exported.
- Specified by:
setHyperlinkParametersin interfaceJRPrintHyperlink- Parameters:
hyperlinkParameters- the set of custom hyperlink parameters
-
addHyperlinkParameter
public void addHyperlinkParameter(JRPrintHyperlinkParameter parameter)
Adds a custom hyperlink parameter.- Parameters:
parameter- the parameter to add- See Also:
getHyperlinkParameters(),JRPrintHyperlinkParameters.addParameter(JRPrintHyperlinkParameter)
-
getLinkType
public java.lang.String getLinkType()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink type.- Specified by:
getLinkTypein interfaceJRPrintHyperlink- Returns:
- the hyperlink type
-
setLinkType
public void setLinkType(java.lang.String linkType)
Description copied from interface:JRPrintHyperlinkSets the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Specified by:
setLinkTypein interfaceJRPrintHyperlink- Parameters:
linkType- the hyperlink type
-
getLinkTarget
public java.lang.String getLinkTarget()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink target name.The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
getLinkTargetin interfaceJRPrintHyperlink- Returns:
- the hyperlink type
-
setLinkTarget
public void setLinkTarget(java.lang.String linkTarget)
Description copied from interface:JRPrintHyperlinkSets the hyperlink target name.The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
setLinkTargetin interfaceJRPrintHyperlink- Parameters:
linkTarget- the hyperlink target name
-
getHyperlinkTooltip
public java.lang.String getHyperlinkTooltip()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink tooltip.- Specified by:
getHyperlinkTooltipin interfaceJRPrintHyperlink- Returns:
- the hyperlink tooltip
-
setHyperlinkTooltip
public void setHyperlinkTooltip(java.lang.String hyperlinkTooltip)
Description copied from interface:JRPrintHyperlinkSets the tooltip to be used for the hyperlink.- Specified by:
setHyperlinkTooltipin interfaceJRPrintHyperlink- Parameters:
hyperlinkTooltip- the tooltip
-
getDefaultLineColor
public java.awt.Color getDefaultLineColor()
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
accept
public <T> void accept(PrintElementVisitor<T> visitor, T arg)
Description copied from interface:JRPrintElementAccepts a print element visitor.The element calls the method that corresponds to the element type on the visitor.
- Specified by:
acceptin interfaceJRPrintElement- Overrides:
acceptin classJRBasePrintElement- Type Parameters:
T- the type of the argument passed to the visit operation- Parameters:
visitor- the visitor objectsarg- the argument passed to the visit operation
-
-