Class JRTemplatePrintText
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintElement
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintText
-
- All Implemented Interfaces:
Serializable
,TextFormat
,JRBoxContainer
,JRCommonElement
,JRCommonText
,JRFont
,JRIdentifiable
,JRParagraphContainer
,JRPrintAnchor
,JRPrintElement
,JRPrintHyperlink
,JRPrintText
,JRPropertiesHolder
,JRStyleContainer
,JRTextAlignment
,VirtualizationSerializable
- Direct Known Subclasses:
JRRecordedValuesPrintText
public class JRTemplatePrintText extends JRTemplatePrintElement implements JRPrintText
Implementation ofJRPrintText
that uses aJRTemplateText
instance to store common attributes.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
bookmarkLevel
The bookmark level for the anchor associated with this field.-
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, template
-
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 JRTemplatePrintText()
JRTemplatePrintText(JRTemplateText text, PrintElementOriginator originator)
Creates a print text element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
accept(PrintElementVisitor<T> visitor, T arg)
Accepts a print element visitor.String
getAnchorName()
Float
getAverageCharWidth()
int
getBookmarkLevel()
Returns the level of the bookmark corresponding to the anchor.String
getFontName()
float
getFontSize()
String
getFormatFactoryClass()
Returns the name of the class implementing theFormatFactory
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.String
getFullText()
Returns the full (not truncated) text of this object.HorizontalTextAlignEnum
getHorizontalTextAlign()
Gets the text horizontal alignment.String
getHyperlinkAnchor()
Integer
getHyperlinkPage()
JRPrintHyperlinkParameters
getHyperlinkParameters()
Returns the set of custom hyperlink parameters.String
getHyperlinkReference()
HyperlinkTargetEnum
getHyperlinkTarget()
String
getHyperlinkTooltip()
Returns the hyperlink tooltip.HyperlinkTypeEnum
getHyperlinkType()
Retrieves the hyperlink type for the element.float
getLeadingOffset()
JRLineBox
getLineBox()
short[]
getLineBreakOffsets()
Returns the line break offsets for the text if saved during report fill.float
getLineSpacingFactor()
String
getLinkTarget()
Returns the hyperlink target name.String
getLinkType()
Returns the hyperlink type.String
getLocaleCode()
Returns the code of thejava.util.Locale
which was used while formatting the source value of the text.String
getMarkup()
Returns the text markup.String
getOriginalText()
Returns the original text that was set in this object.String
getOwnFontName()
Float
getOwnFontSize()
HorizontalTextAlignEnum
getOwnHorizontalTextAlign()
String
getOwnMarkup()
String
getOwnPdfEncoding()
String
getOwnPdfFontName()
RotationEnum
getOwnRotation()
Gets the text own rotation.VerticalTextAlignEnum
getOwnVerticalTextAlign()
JRParagraph
getParagraph()
String
getPattern()
Returns the pattern used to format a value that was the source of this text.String
getPdfEncoding()
String
getPdfFontName()
RotationEnum
getRotation()
Gets the text rotation.RunDirectionEnum
getRunDirection()
Gets the text run direction.float
getTextHeight()
Integer
getTextTruncateIndex()
Returns the index to which this object's text is to be truncated.String
getTextTruncateSuffix()
Returns the suffix that is to be appended to the truncated text (as returned byJRStyledTextUtil.getTruncatedText(JRPrintText)
.String
getTimeZoneId()
Returns theID
of thejava.util.TimeZone
used to format this text's date source value.Object
getValue()
String
getValueClassName()
Returns the type of the value which was used to generate this text.VerticalTextAlignEnum
getVerticalTextAlign()
Gets the text vertical alignment.boolean
isBold()
boolean
isItalic()
Boolean
isOwnBold()
Boolean
isOwnItalic()
Boolean
isOwnPdfEmbedded()
Boolean
isOwnStrikeThrough()
Boolean
isOwnUnderline()
boolean
isPdfEmbedded()
boolean
isStrikeThrough()
boolean
isUnderline()
void
readVirtualized(VirtualizationInput in)
void
setAnchorName(String anchorName)
void
setAverageCharWidth(Float averageCharWidth)
void
setBold(Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.void
setBookmarkLevel(int bookmarkLevel)
Sets the boomark level for the anchor.void
setFontName(String fontName)
void
setFontSize(Float fontSize)
Method which allows also to reset the "own" size property.void
setHorizontalTextAlign(HorizontalTextAlignEnum horizontalAlignment)
Sets the text horizontal alignment.void
setHyperlinkAnchor(String hyperlinkAnchor)
void
setHyperlinkOmitted(boolean hyperlinkOmitted)
void
setHyperlinkPage(Integer hyperlinkPage)
void
setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)
Sets the custom hyperlink parameters.void
setHyperlinkReference(String hyperlinkReference)
void
setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
void
setHyperlinkTooltip(String hyperlinkTooltip)
Sets the tooltip to be used for the hyperlink.void
setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
Sets the link type as a built-in hyperlink type.void
setItalic(Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.void
setLeadingOffset(float leadingOffset)
void
setLineBreakOffsets(short[] lineBreakOffsets)
Sets the line break offsets for the text.void
setLineSpacingFactor(float lineSpacingFactor)
void
setLinkTarget(byte hyperlinkTarget)
void
setLinkTarget(String linkTarget)
Sets the hyperlink target name.void
setLinkType(String type)
Sets the hyperlink type.void
setMarkup(String markup)
void
setPdfEmbedded(Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.void
setPdfEncoding(String pdfEncoding)
void
setPdfFontName(String pdfFontName)
void
setRotation(RotationEnum rotation)
Sets the text rotation.void
setRunDirection(RunDirectionEnum runDirection)
Sets the text run direction.void
setStrikeThrough(Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.void
setText(String text)
Set the text for this object.void
setTextFormat(TextFormat textFormat)
void
setTextHeight(float textHeight)
void
setTextTruncateIndex(Integer textTruncateIndex)
Sets the index to which this object's text is to be truncated.void
setTextTruncateSuffix(String textTruncateSuffix)
Sets the suffix to be appended to the truncated text.void
setUnderline(Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.void
setValue(Object value)
void
setVerticalTextAlign(VerticalTextAlignEnum verticalAlignment)
Gets the text vertical alignment.void
writeVirtualized(VirtualizationOutput out)
-
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
getBackcolor, getDefaultLineColor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getMode, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, setUUID, setWidth, setX, setY, updateElementTemplate
-
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.JRBoxContainer
getDefaultLineColor
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, 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, getStyleName, getStyleNameReference
-
-
-
-
Field Detail
-
bookmarkLevel
protected int bookmarkLevel
The bookmark level for the anchor associated with this field.- See Also:
JRAnchor.getBookmarkLevel()
-
-
Constructor Detail
-
JRTemplatePrintText
public JRTemplatePrintText()
-
JRTemplatePrintText
public JRTemplatePrintText(JRTemplateText text, PrintElementOriginator originator)
Creates a print text element.- Parameters:
text
- the template text that the element will useoriginator
-
-
-
Method Detail
-
setText
public void setText(String text)
Description copied from interface:JRPrintText
Set the text for this object.- Specified by:
setText
in interfaceJRPrintText
- Parameters:
text
- the text- See Also:
JRPrintText.setTextTruncateIndex(Integer)
-
getTextTruncateIndex
public Integer getTextTruncateIndex()
Description copied from interface:JRPrintText
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.- Specified by:
getTextTruncateIndex
in 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(Integer textTruncateIndex)
Description copied from interface:JRPrintText
Sets 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:
setTextTruncateIndex
in interfaceJRPrintText
- Parameters:
textTruncateIndex
- the index to which this object's text is to be truncated
-
getTextTruncateSuffix
public String getTextTruncateSuffix()
Description copied from interface:JRPrintText
Returns the suffix that is to be appended to the truncated text (as returned byJRStyledTextUtil.getTruncatedText(JRPrintText)
.- Specified by:
getTextTruncateSuffix
in interfaceJRPrintText
- Returns:
- the truncated text suffix
- See Also:
JRTextElement.PROPERTY_TRUNCATE_SUFFIX
-
setTextTruncateSuffix
public void setTextTruncateSuffix(String textTruncateSuffix)
Description copied from interface:JRPrintText
Sets the suffix to be appended to the truncated text.- Specified by:
setTextTruncateSuffix
in interfaceJRPrintText
- Parameters:
textTruncateSuffix
- the suffix to be appended to the truncated text- See Also:
JRPrintText.getTextTruncateSuffix()
-
getLineBreakOffsets
public short[] getLineBreakOffsets()
Description copied from interface:JRPrintText
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
.- Specified by:
getLineBreakOffsets
in interfaceJRPrintText
- 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
public void setLineBreakOffsets(short[] lineBreakOffsets)
Description copied from interface:JRPrintText
Sets the line break offsets for the text.- Specified by:
setLineBreakOffsets
in interfaceJRPrintText
- Parameters:
lineBreakOffsets
- the line break offsets- See Also:
JRPrintText.getLineBreakOffsets()
-
getFullText
public String getFullText()
Description copied from interface:JRPrintText
Returns the full (not truncated) text of this object.- Specified by:
getFullText
in interfaceJRPrintText
- Returns:
- the full text of this object
- See Also:
JRStyledTextUtil.getTruncatedText(JRPrintText)
,JRPrintText.getTextTruncateIndex()
-
getOriginalText
public String getOriginalText()
Description copied from interface:JRPrintText
Returns the original text that was set in this object.- Specified by:
getOriginalText
in interfaceJRPrintText
- Returns:
- the original text
-
getFullStyledText
public JRStyledText getFullStyledText(JRStyledTextAttributeSelector attributeSelector)
Description copied from interface:JRPrintText
Returns the full styled text of this object.- Specified by:
getFullStyledText
in interfaceJRPrintText
- Parameters:
attributeSelector
- the styled text attribute selector- Returns:
- the full styled text of this object
- See Also:
JRPrintText.getFullText()
-
getValue
public Object getValue()
- Specified by:
getValue
in interfaceJRPrintText
-
setValue
public void setValue(Object value)
- Specified by:
setValue
in interfaceJRPrintText
-
getLineSpacingFactor
public float getLineSpacingFactor()
- Specified by:
getLineSpacingFactor
in interfaceJRPrintText
-
setLineSpacingFactor
public void setLineSpacingFactor(float lineSpacingFactor)
- Specified by:
setLineSpacingFactor
in interfaceJRPrintText
-
getLeadingOffset
public float getLeadingOffset()
- Specified by:
getLeadingOffset
in interfaceJRPrintText
-
setLeadingOffset
public void setLeadingOffset(float leadingOffset)
- Specified by:
setLeadingOffset
in interfaceJRPrintText
-
getHorizontalTextAlign
public HorizontalTextAlignEnum getHorizontalTextAlign()
Description copied from interface:JRTextAlignment
Gets the text horizontal alignment.- Specified by:
getHorizontalTextAlign
in interfaceJRTextAlignment
- Returns:
- a value representing one of the horizontal text alignment constants in
HorizontalTextAlignEnum
-
getOwnHorizontalTextAlign
public HorizontalTextAlignEnum getOwnHorizontalTextAlign()
- Specified by:
getOwnHorizontalTextAlign
in interfaceJRTextAlignment
-
setHorizontalTextAlign
public void setHorizontalTextAlign(HorizontalTextAlignEnum horizontalAlignment)
Description copied from interface:JRTextAlignment
Sets the text horizontal alignment.- Specified by:
setHorizontalTextAlign
in interfaceJRTextAlignment
- Parameters:
horizontalAlignment
- a value representing one of the horizontal text alignment constants inHorizontalTextAlignEnum
-
getVerticalTextAlign
public VerticalTextAlignEnum getVerticalTextAlign()
Description copied from interface:JRTextAlignment
Gets the text vertical alignment.- Specified by:
getVerticalTextAlign
in interfaceJRTextAlignment
- Returns:
- a value representing one of the vertical text alignment constants in
VerticalTextAlignEnum
-
getOwnVerticalTextAlign
public VerticalTextAlignEnum getOwnVerticalTextAlign()
- Specified by:
getOwnVerticalTextAlign
in interfaceJRTextAlignment
-
setVerticalTextAlign
public void setVerticalTextAlign(VerticalTextAlignEnum verticalAlignment)
Description copied from interface:JRTextAlignment
Gets the text vertical alignment.- Specified by:
setVerticalTextAlign
in interfaceJRTextAlignment
- Parameters:
verticalAlignment
- a value representing one of the vertical text alignment constants inVerticalTextAlignEnum
-
getRotation
public RotationEnum getRotation()
Description copied from interface:JRCommonText
Gets the text rotation.- Specified by:
getRotation
in interfaceJRCommonText
- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
getOwnRotation
public RotationEnum getOwnRotation()
Description copied from interface:JRCommonText
Gets the text own rotation.- Specified by:
getOwnRotation
in interfaceJRCommonText
- 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 interfaceJRCommonText
- Parameters:
rotation
- a value representing one of the text rotation constants inRotationEnum
-
getRunDirection
public RunDirectionEnum getRunDirection()
Description copied from interface:JRPrintText
Gets the text run direction.- Specified by:
getRunDirection
in interfaceJRPrintText
- Returns:
- a value representing one of the run direction constants in
RunDirectionEnum
-
setRunDirection
public void setRunDirection(RunDirectionEnum runDirection)
Description copied from interface:JRPrintText
Sets the text run direction.- Specified by:
setRunDirection
in interfaceJRPrintText
- Parameters:
runDirection
- a value representing one of the text run direction constants inRunDirectionEnum
-
getAverageCharWidth
public Float getAverageCharWidth()
- Specified by:
getAverageCharWidth
in interfaceJRPrintText
-
setAverageCharWidth
public void setAverageCharWidth(Float averageCharWidth)
- Specified by:
setAverageCharWidth
in interfaceJRPrintText
-
getTextHeight
public float getTextHeight()
- Specified by:
getTextHeight
in interfaceJRPrintText
-
setTextHeight
public void setTextHeight(float textHeight)
- Specified by:
setTextHeight
in interfaceJRPrintText
-
getMarkup
public String getMarkup()
Description copied from interface:JRCommonText
Returns the text markup.- Specified by:
getMarkup
in interfaceJRCommonText
-
getOwnMarkup
public String getOwnMarkup()
- Specified by:
getOwnMarkup
in interfaceJRCommonText
-
setMarkup
public void setMarkup(String markup)
- Specified by:
setMarkup
in interfaceJRCommonText
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBox
in interfaceJRBoxContainer
-
getParagraph
public JRParagraph getParagraph()
- Specified by:
getParagraph
in interfaceJRParagraphContainer
-
setTextFormat
public void setTextFormat(TextFormat textFormat)
- Specified by:
setTextFormat
in interfaceJRPrintText
-
getAnchorName
public String getAnchorName()
- Specified by:
getAnchorName
in interfaceJRPrintAnchor
-
setAnchorName
public void setAnchorName(String anchorName)
- Specified by:
setAnchorName
in interfaceJRPrintAnchor
-
setHyperlinkOmitted
public void setHyperlinkOmitted(boolean hyperlinkOmitted)
-
getHyperlinkType
public HyperlinkTypeEnum getHyperlinkType()
Description copied from interface:JRPrintHyperlink
Retrieves 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,CUSTOM
is returned.- Specified by:
getHyperlinkType
in interfaceJRPrintHyperlink
- Returns:
- one of the hyperlink type constants
- See Also:
JRPrintHyperlink.getLinkType()
-
setHyperlinkType
public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
Description copied from interface:JRPrintHyperlink
Sets the link type as a built-in hyperlink type.- Specified by:
setHyperlinkType
in interfaceJRPrintHyperlink
- Parameters:
hyperlinkType
- the built-in hyperlink type- See Also:
JRPrintHyperlink.getLinkType()
-
getHyperlinkTarget
public HyperlinkTargetEnum getHyperlinkTarget()
- Specified by:
getHyperlinkTarget
in interfaceJRPrintHyperlink
-
setHyperlinkTarget
public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
- Specified by:
setHyperlinkTarget
in interfaceJRPrintHyperlink
-
getLinkTarget
public String getLinkTarget()
Description copied from interface:JRPrintHyperlink
Returns 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:
getLinkTarget
in interfaceJRPrintHyperlink
- Returns:
- the hyperlink type
-
setLinkTarget
public void setLinkTarget(String linkTarget)
Description copied from interface:JRPrintHyperlink
Sets 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:
setLinkTarget
in interfaceJRPrintHyperlink
- Parameters:
linkTarget
- the hyperlink target name
-
setLinkTarget
public void setLinkTarget(byte hyperlinkTarget)
-
getHyperlinkReference
public String getHyperlinkReference()
- Specified by:
getHyperlinkReference
in interfaceJRPrintHyperlink
-
setHyperlinkReference
public void setHyperlinkReference(String hyperlinkReference)
- Specified by:
setHyperlinkReference
in interfaceJRPrintHyperlink
-
getHyperlinkAnchor
public String getHyperlinkAnchor()
- Specified by:
getHyperlinkAnchor
in interfaceJRPrintHyperlink
-
setHyperlinkAnchor
public void setHyperlinkAnchor(String hyperlinkAnchor)
- Specified by:
setHyperlinkAnchor
in interfaceJRPrintHyperlink
-
getHyperlinkPage
public Integer getHyperlinkPage()
- Specified by:
getHyperlinkPage
in interfaceJRPrintHyperlink
-
setHyperlinkPage
public void setHyperlinkPage(Integer hyperlinkPage)
- Specified by:
setHyperlinkPage
in interfaceJRPrintHyperlink
-
getBookmarkLevel
public int getBookmarkLevel()
Description copied from interface:JRPrintAnchor
Returns the level of the bookmark corresponding to the anchor.- Specified by:
getBookmarkLevel
in interfaceJRPrintAnchor
- Returns:
- the level of the bookmark corresponding to the anchor (starting from 1)
or
NO_BOOKMARK
if no bookmark should be created for this anchor
-
setBookmarkLevel
public void setBookmarkLevel(int bookmarkLevel)
Description copied from interface:JRPrintAnchor
Sets the boomark level for the anchor.- Specified by:
setBookmarkLevel
in interfaceJRPrintAnchor
- Parameters:
bookmarkLevel
- the bookmark level (starting from 1) orNO_BOOKMARK
if no bookmark should be created
-
getFontName
public String getFontName()
- Specified by:
getFontName
in interfaceJRFont
-
getOwnFontName
public String getOwnFontName()
- Specified by:
getOwnFontName
in interfaceJRFont
-
setFontName
public void setFontName(String fontName)
- Specified by:
setFontName
in interfaceJRFont
-
setBold
public void setBold(Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.
-
isOwnItalic
public Boolean isOwnItalic()
- Specified by:
isOwnItalic
in interfaceJRFont
-
setItalic
public void setItalic(Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.
-
isUnderline
public boolean isUnderline()
- Specified by:
isUnderline
in interfaceJRFont
-
isOwnUnderline
public Boolean isOwnUnderline()
- Specified by:
isOwnUnderline
in interfaceJRFont
-
setUnderline
public void setUnderline(Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderline
in interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()
- Specified by:
isStrikeThrough
in interfaceJRFont
-
isOwnStrikeThrough
public Boolean isOwnStrikeThrough()
- Specified by:
isOwnStrikeThrough
in interfaceJRFont
-
setStrikeThrough
public void setStrikeThrough(Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThrough
in interfaceJRFont
-
getFontSize
public float getFontSize()
- Specified by:
getFontSize
in interfaceJRCommonText
- Specified by:
getFontSize
in interfaceJRFont
-
getOwnFontSize
public Float getOwnFontSize()
- Specified by:
getOwnFontSize
in interfaceJRFont
-
setFontSize
public void setFontSize(Float fontSize)
Method which allows also to reset the "own" size property.- Specified by:
setFontSize
in interfaceJRFont
-
getPdfFontName
public String getPdfFontName()
- Specified by:
getPdfFontName
in interfaceJRFont
-
getOwnPdfFontName
public String getOwnPdfFontName()
- Specified by:
getOwnPdfFontName
in interfaceJRFont
-
setPdfFontName
public void setPdfFontName(String pdfFontName)
- Specified by:
setPdfFontName
in interfaceJRFont
-
getPdfEncoding
public String getPdfEncoding()
- Specified by:
getPdfEncoding
in interfaceJRFont
-
getOwnPdfEncoding
public String getOwnPdfEncoding()
- Specified by:
getOwnPdfEncoding
in interfaceJRFont
-
setPdfEncoding
public void setPdfEncoding(String pdfEncoding)
- Specified by:
setPdfEncoding
in interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()
- Specified by:
isPdfEmbedded
in interfaceJRFont
-
isOwnPdfEmbedded
public Boolean isOwnPdfEmbedded()
- Specified by:
isOwnPdfEmbedded
in interfaceJRFont
-
setPdfEmbedded
public void setPdfEmbedded(Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbedded
in interfaceJRFont
-
getValueClassName
public String getValueClassName()
Description copied from interface:JRPrintText
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.- Specified by:
getValueClassName
in interfaceJRPrintText
- Specified by:
getValueClassName
in interfaceTextFormat
- Returns:
- the type of the original value used to generate the text
-
getPattern
public String getPattern()
Description copied from interface:JRPrintText
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.
- Specified by:
getPattern
in interfaceJRPrintText
- Specified by:
getPattern
in interfaceTextFormat
- Returns:
- the pattern used to format this text's source value
- See Also:
JRPrintText.getValueClassName()
-
getFormatFactoryClass
public String getFormatFactoryClass()
Description copied from interface:JRPrintText
Returns the name of the class implementing theFormatFactory
interface to use with this text element, in case it is not the same as the one for the overall document.- Specified by:
getFormatFactoryClass
in interfaceJRPrintText
- Specified by:
getFormatFactoryClass
in interfaceTextFormat
-
getLocaleCode
public String getLocaleCode()
Description copied from interface:JRPrintText
Returns the code of thejava.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.- Specified by:
getLocaleCode
in interfaceJRPrintText
- Specified by:
getLocaleCode
in interfaceTextFormat
- Returns:
- the code of the
java.util.Locale
used when formatting this text's source value
-
getTimeZoneId
public String getTimeZoneId()
Description copied from interface:JRPrintText
Returns theID
of thejava.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.- Specified by:
getTimeZoneId
in interfaceJRPrintText
- Specified by:
getTimeZoneId
in interfaceTextFormat
- Returns:
- the
ID
of thejava.util.TimeZone
used to format this text's date source value
-
getHyperlinkParameters
public JRPrintHyperlinkParameters getHyperlinkParameters()
Description copied from interface:JRPrintHyperlink
Returns the set of custom hyperlink parameters.- Specified by:
getHyperlinkParameters
in interfaceJRPrintHyperlink
- Returns:
- the set of custom hyperlink parameters
- See Also:
JRPrintHyperlink.setHyperlinkParameters(JRPrintHyperlinkParameters)
,JRPrintHyperlinkParameter
-
setHyperlinkParameters
public void setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)
Description copied from interface:JRPrintHyperlink
Sets the custom hyperlink parameters.These parameters will be used to produce the actual hyperlink when the report is exported.
- Specified by:
setHyperlinkParameters
in interfaceJRPrintHyperlink
- Parameters:
hyperlinkParameters
- the set of custom hyperlink parameters
-
getLinkType
public String getLinkType()
Description copied from interface:JRPrintHyperlink
Returns the hyperlink type.- Specified by:
getLinkType
in interfaceJRPrintHyperlink
- Returns:
- the hyperlink type
-
setLinkType
public void setLinkType(String type)
Description copied from interface:JRPrintHyperlink
Sets 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:
setLinkType
in interfaceJRPrintHyperlink
- Parameters:
type
- the hyperlink type
-
getHyperlinkTooltip
public String getHyperlinkTooltip()
Description copied from interface:JRPrintHyperlink
Returns the hyperlink tooltip.- Specified by:
getHyperlinkTooltip
in interfaceJRPrintHyperlink
- Returns:
- the hyperlink tooltip
-
setHyperlinkTooltip
public void setHyperlinkTooltip(String hyperlinkTooltip)
Description copied from interface:JRPrintHyperlink
Sets the tooltip to be used for the hyperlink.- Specified by:
setHyperlinkTooltip
in interfaceJRPrintHyperlink
- Parameters:
hyperlinkTooltip
- the tooltip
-
accept
public <T> void accept(PrintElementVisitor<T> visitor, T arg)
Description copied from interface:JRPrintElement
Accepts a print element visitor.The element calls the method that corresponds to the element type on the visitor.
- Specified by:
accept
in interfaceJRPrintElement
- Overrides:
accept
in classJRTemplatePrintElement
- 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
-
writeVirtualized
public void writeVirtualized(VirtualizationOutput out) throws IOException
- Specified by:
writeVirtualized
in interfaceVirtualizationSerializable
- Overrides:
writeVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-
readVirtualized
public void readVirtualized(VirtualizationInput in) throws IOException
- Specified by:
readVirtualized
in interfaceVirtualizationSerializable
- Overrides:
readVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-
-