public class JRTemplateText extends JRTemplateElement implements JRAlignment, JRTextAlignment, JRFont, JRCommonText, TextFormat
JRTemplatePrintText,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected String |
fontName |
protected Float |
fontsize |
protected String |
formatFactoryClass |
protected Boolean |
isBold |
protected Boolean |
isItalic |
protected Boolean |
isPdfEmbedded |
protected Boolean |
isStrikeThrough |
protected Boolean |
isUnderline |
protected JRLineBox |
lineBox |
protected String |
localeCode |
protected JRParagraph |
paragraph |
protected String |
pattern |
protected String |
pdfEncoding |
protected String |
pdfFontName |
protected String |
timeZoneId |
protected String |
valueClassName |
defaultStyleProvider, origin, parentStyleDEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAMEMARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXT| Modifier | Constructor and Description |
|---|---|
|
JRTemplateText(JROrigin origin,
JRDefaultStyleProvider defaultStyleProvider)
Creates a template text.
|
protected |
JRTemplateText(JROrigin origin,
JRDefaultStyleProvider defaultStyleProvider,
JRStaticText staticText) |
protected |
JRTemplateText(JROrigin origin,
JRDefaultStyleProvider defaultStyleProvider,
JRTextField textField) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyLineBox(JRLineBox box)
Copies box attributes.
|
void |
copyParagraph(JRParagraph prg)
Copies paragraph attributes.
|
Color |
getDefaultLineColor() |
JRFont |
getFont()
Deprecated.
|
String |
getFontName() |
float |
getFontsize() |
int |
getFontSize()
Deprecated.
Replaced by
getFontsize(). |
String |
getFormatFactoryClass() |
int |
getHashCode()
Returns a hash code to be used for the deduplicate map.
|
HorizontalAlignEnum |
getHorizontalAlignmentValue()
Deprecated.
Replaced by
getHorizontalTextAlign(). |
HorizontalTextAlignEnum |
getHorizontalTextAlign()
Gets the text horizontal alignment.
|
byte |
getHyperlinkTarget()
Deprecated.
|
HyperlinkTargetEnum |
getHyperlinkTargetValue()
Retrieves the hyperlink target name for the element.
|
HyperlinkTypeEnum |
getHyperlinkTypeValue()
Retrieves the hyperlink type for the element.
|
JRLineBox |
getLineBox() |
LineSpacingEnum |
getLineSpacingValue()
Deprecated.
Replaced by
JRParagraph.getLineSpacing(). |
String |
getLinkTarget()
Returns the hyperlink target name.
|
String |
getLinkType()
Returns the hyperlink type.
|
String |
getLocaleCode() |
String |
getMarkup()
Returns the text markup.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
String |
getOwnFontName() |
Float |
getOwnFontsize() |
Integer |
getOwnFontSize()
Deprecated.
Replaced by
getOwnFontsize(). |
HorizontalAlignEnum |
getOwnHorizontalAlignmentValue()
Deprecated.
Replaced by
getOwnHorizontalTextAlign(). |
HorizontalTextAlignEnum |
getOwnHorizontalTextAlign() |
LineSpacingEnum |
getOwnLineSpacingValue()
Deprecated.
Replaced by
JRParagraph.getOwnLineSpacing(). |
String |
getOwnMarkup() |
String |
getOwnPdfEncoding() |
String |
getOwnPdfFontName() |
RotationEnum |
getOwnRotationValue()
Gets the text own rotation.
|
VerticalAlignEnum |
getOwnVerticalAlignmentValue()
Deprecated.
Replaced by
getOwnVerticalTextAlign(). |
VerticalTextAlignEnum |
getOwnVerticalTextAlign() |
JRParagraph |
getParagraph() |
String |
getPattern() |
String |
getPdfEncoding() |
String |
getPdfFontName() |
RotationEnum |
getRotationValue()
Gets the text rotation.
|
JRStyle |
getStyle()
Returns this object's style.
|
String |
getTimeZoneId() |
String |
getValueClassName() |
VerticalAlignEnum |
getVerticalAlignmentValue()
Deprecated.
Replaced by
getVerticalTextAlign(). |
VerticalTextAlignEnum |
getVerticalTextAlign()
Gets the text vertical alignment.
|
boolean |
isBold() |
boolean |
isIdentical(Object object)
Determines if this instance is identical to another object.
|
boolean |
isItalic() |
Boolean |
isOwnBold() |
Boolean |
isOwnItalic() |
Boolean |
isOwnPdfEmbedded() |
Boolean |
isOwnStrikeThrough() |
Boolean |
isOwnUnderline() |
boolean |
isPdfEmbedded() |
boolean |
isStrikeThrough() |
boolean |
isUnderline() |
void |
setBold(boolean isBold) |
void |
setBold(Boolean isBold)
Alternative setBold method which allows also to reset
the "own" isBold property.
|
void |
setFontName(String fontName) |
void |
setFontSize(Float fontSize)
Method which allows also to reset the "own" size property.
|
void |
setFontSize(int fontSize)
Deprecated.
Replaced by
setFontSize(Float). |
void |
setFontSize(Integer fontSize)
Deprecated.
Replaced by
setFontSize(Float). |
void |
setFormatFactoryClass(String formatFactoryClass) |
void |
setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
Deprecated.
Replaced by
setHorizontalTextAlign(HorizontalTextAlignEnum). |
void |
setHorizontalTextAlign(HorizontalTextAlignEnum horizontalTextAlign)
Sets the text horizontal alignment.
|
void |
setItalic(boolean isItalic) |
void |
setItalic(Boolean isItalic)
Alternative setItalic method which allows also to reset
the "own" isItalic property.
|
void |
setLineSpacing(LineSpacingEnum lineSpacing)
Deprecated.
Replaced by
JRParagraph.setLineSpacing(LineSpacingEnum). |
protected void |
setLinkTarget(String linkTarget) |
void |
setLinkType(String linkType)
Sets the hyperlink type.
|
void |
setLocaleCode(String localeCode) |
void |
setMarkup(String markup)
Sets the text markup attribute.
|
void |
setPattern(String pattern) |
void |
setPdfEmbedded(boolean isPdfEmbedded) |
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 rotationValue)
Sets the text rotation.
|
protected void |
setStaticText(JRStaticText staticText) |
void |
setStrikeThrough(boolean isStrikeThrough) |
void |
setStrikeThrough(Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset
the "own" isStrikeThrough property.
|
protected void |
setTextElement(JRTextElement textElement) |
protected void |
setTextField(JRTextField textField) |
void |
setTextFormat(TextFormat textFormat) |
void |
setTimeZoneId(String timeZoneId) |
void |
setUnderline(boolean isUnderline) |
void |
setUnderline(Boolean isUnderline)
Alternative setUnderline method which allows also to reset
the "own" isUnderline property.
|
void |
setValueClassName(String valueClassName) |
void |
setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
Deprecated.
Replaced by
setVerticalTextAlign(VerticalTextAlignEnum). |
void |
setVerticalTextAlign(VerticalTextAlignEnum verticalTextAlign)
Gets the text vertical alignment.
|
addTemplateHash, getBackcolor, getBaseStyle, getDefaultStyleProvider, getForecolor, getHeight, getId, getKey, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPropertiesMap, getStyleNameReference, getStyleResolver, getWidth, hasProperties, setBackcolor, setElement, setForecolor, setKey, setMode, setStyle, templateIdenticalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setModegetDefaultStyleProvider, getStyleNameReferenceprotected JRLineBox lineBox
protected JRParagraph paragraph
protected String fontName
protected Boolean isBold
protected Boolean isItalic
protected Boolean isUnderline
protected Boolean isStrikeThrough
protected Float fontsize
protected String pdfFontName
protected String pdfEncoding
protected Boolean isPdfEmbedded
protected String valueClassName
protected String pattern
protected String formatFactoryClass
protected String localeCode
protected String timeZoneId
protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRStaticText staticText)
protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRTextField textField)
public JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider)
origin - the origin of the elements that will use this templatedefaultStyleProvider - the default style provider to use for
this templateprotected void setStaticText(JRStaticText staticText)
protected void setTextField(JRTextField textField)
protected void setTextElement(JRTextElement textElement)
public void setTextFormat(TextFormat textFormat)
public void copyLineBox(JRLineBox box)
box - the object to copy attributes frompublic void copyParagraph(JRParagraph prg)
prg - the object to copy attributes frompublic ModeEnum getModeValue()
JRCommonElementgetModeValue in interface JRCommonElementgetModeValue in class JRTemplateElementpublic HorizontalAlignEnum getHorizontalAlignmentValue()
getHorizontalTextAlign().JRAlignmentgetHorizontalAlignmentValue in interface JRAlignmentHorizontalAlignEnumpublic HorizontalAlignEnum getOwnHorizontalAlignmentValue()
getOwnHorizontalTextAlign().getOwnHorizontalAlignmentValue in interface JRAlignmentpublic void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
setHorizontalTextAlign(HorizontalTextAlignEnum).JRAlignmentsetHorizontalAlignment in interface JRAlignmenthorizontalAlignmentValue - a value representing one of the horizontal alignment constants in HorizontalAlignEnumpublic VerticalAlignEnum getVerticalAlignmentValue()
getVerticalTextAlign().JRAlignmentgetVerticalAlignmentValue in interface JRAlignmentVerticalAlignEnumpublic VerticalAlignEnum getOwnVerticalAlignmentValue()
getOwnVerticalTextAlign().getOwnVerticalAlignmentValue in interface JRAlignmentpublic void setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
setVerticalTextAlign(VerticalTextAlignEnum).JRAlignmentsetVerticalAlignment in interface JRAlignmentverticalAlignmentValue - a value representing one of the vertical alignment constants in VerticalAlignEnumpublic HorizontalTextAlignEnum getHorizontalTextAlign()
JRTextAlignmentgetHorizontalTextAlign in interface JRTextAlignmentHorizontalTextAlignEnumpublic HorizontalTextAlignEnum getOwnHorizontalTextAlign()
getOwnHorizontalTextAlign in interface JRTextAlignmentpublic void setHorizontalTextAlign(HorizontalTextAlignEnum horizontalTextAlign)
JRTextAlignmentsetHorizontalTextAlign in interface JRTextAlignmenthorizontalTextAlign - a value representing one of the horizontal text alignment constants in HorizontalTextAlignEnumpublic VerticalTextAlignEnum getVerticalTextAlign()
JRTextAlignmentgetVerticalTextAlign in interface JRTextAlignmentVerticalTextAlignEnumpublic VerticalTextAlignEnum getOwnVerticalTextAlign()
getOwnVerticalTextAlign in interface JRTextAlignmentpublic void setVerticalTextAlign(VerticalTextAlignEnum verticalTextAlign)
JRTextAlignmentsetVerticalTextAlign in interface JRTextAlignmentverticalTextAlign - a value representing one of the vertical text alignment constants in VerticalTextAlignEnumpublic RotationEnum getRotationValue()
JRCommonTextgetRotationValue in interface JRCommonTextRotationEnumpublic RotationEnum getOwnRotationValue()
JRCommonTextgetOwnRotationValue in interface JRCommonTextRotationEnumpublic void setRotation(RotationEnum rotationValue)
setRotation in interface JRCommonTextrotationValue - one of
values, or null if this template
should not specify a rotation attribute of its ownpublic LineSpacingEnum getLineSpacingValue()
JRParagraph.getLineSpacing().getLineSpacingValue in interface JRCommonTextpublic LineSpacingEnum getOwnLineSpacingValue()
JRParagraph.getOwnLineSpacing().getOwnLineSpacingValue in interface JRCommonTextpublic void setLineSpacing(LineSpacingEnum lineSpacing)
JRParagraph.setLineSpacing(LineSpacingEnum).setLineSpacing in interface JRCommonTextpublic String getMarkup()
JRCommonTextgetMarkup in interface JRCommonTextpublic String getOwnMarkup()
getOwnMarkup in interface JRCommonTextpublic void setMarkup(String markup)
setMarkup in interface JRCommonTextmarkup - the markup attributegetMarkup()public JRLineBox getLineBox()
getLineBox in interface JRBoxContainerpublic JRParagraph getParagraph()
getParagraph in interface JRParagraphContainerpublic JRFont getFont()
public HyperlinkTypeEnum getHyperlinkTypeValue()
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.
O * When hyperlink is of custom type, CUSTOM is returned.
getLinkType()public byte getHyperlinkTarget()
public HyperlinkTargetEnum getHyperlinkTargetValue()
The actual hyperlink target name is determined by getLinkTarget().
This method is used to determine whether the hyperlink target name is one of the
built-in names or a custom one.
When hyperlink target has a custom name, CUSTOM is returned.
getLinkTarget()public String getFontName()
getFontName in interface JRFontpublic String getOwnFontName()
getOwnFontName in interface JRFontpublic void setFontName(String fontName)
setFontName in interface JRFontpublic void setBold(Boolean isBold)
public Boolean isOwnItalic()
isOwnItalic in interface JRFontpublic void setItalic(Boolean isItalic)
public boolean isUnderline()
isUnderline in interface JRFontpublic Boolean isOwnUnderline()
isOwnUnderline in interface JRFontpublic void setUnderline(boolean isUnderline)
setUnderline in interface JRFontpublic void setUnderline(Boolean isUnderline)
setUnderline in interface JRFontpublic boolean isStrikeThrough()
isStrikeThrough in interface JRFontpublic Boolean isOwnStrikeThrough()
isOwnStrikeThrough in interface JRFontpublic void setStrikeThrough(boolean isStrikeThrough)
setStrikeThrough in interface JRFontpublic void setStrikeThrough(Boolean isStrikeThrough)
setStrikeThrough in interface JRFontpublic float getFontsize()
getFontsize in interface JRCommonTextgetFontsize in interface JRFontpublic Float getOwnFontsize()
getOwnFontsize in interface JRFontpublic void setFontSize(Float fontSize)
setFontSize in interface JRFontpublic int getFontSize()
getFontsize().getFontSize in interface JRCommonTextgetFontSize in interface JRFontpublic Integer getOwnFontSize()
getOwnFontsize().getOwnFontSize in interface JRFontpublic void setFontSize(int fontSize)
setFontSize(Float).setFontSize in interface JRFontpublic void setFontSize(Integer fontSize)
setFontSize(Float).setFontSize in interface JRFontpublic String getPdfFontName()
getPdfFontName in interface JRFontpublic String getOwnPdfFontName()
getOwnPdfFontName in interface JRFontpublic void setPdfFontName(String pdfFontName)
setPdfFontName in interface JRFontpublic String getPdfEncoding()
getPdfEncoding in interface JRFontpublic String getOwnPdfEncoding()
getOwnPdfEncoding in interface JRFontpublic void setPdfEncoding(String pdfEncoding)
setPdfEncoding in interface JRFontpublic boolean isPdfEmbedded()
isPdfEmbedded in interface JRFontpublic Boolean isOwnPdfEmbedded()
isOwnPdfEmbedded in interface JRFontpublic void setPdfEmbedded(boolean isPdfEmbedded)
setPdfEmbedded in interface JRFontpublic void setPdfEmbedded(Boolean isPdfEmbedded)
setPdfEmbedded in interface JRFontpublic JRStyle getStyle()
JRStyleContainergetStyle in interface JRStyleContainergetStyle in class JRTemplateElementpublic String getPattern()
getPattern in interface TextFormatpublic void setPattern(String pattern)
public String getValueClassName()
getValueClassName in interface TextFormatpublic void setValueClassName(String valueClassName)
public String getFormatFactoryClass()
getFormatFactoryClass in interface TextFormatpublic void setFormatFactoryClass(String formatFactoryClass)
public String getLocaleCode()
getLocaleCode in interface TextFormatpublic void setLocaleCode(String localeCode)
public String getTimeZoneId()
getTimeZoneId in interface TextFormatpublic void setTimeZoneId(String timeZoneId)
public String getLinkType()
The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
public void setLinkType(String linkType)
The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
linkType - the hyperlink typeprotected void setLinkTarget(String linkTarget)
public String getLinkTarget()
The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
public Color getDefaultLineColor()
getDefaultLineColor in interface JRBoxContainerpublic int getHashCode()
DeduplicableDeduplicable.isIdentical(Object),
i.e. if two objects are identical they should have the same hash code.getHashCode in interface Deduplicablepublic boolean isIdentical(Object object)
DeduplicableisIdentical in interface Deduplicableobject - the object to compare with this instancetrue if the two objects are identical and can be deduplicatedCopyright © 2017. All rights reserved.