public class JRTemplateText extends JRTemplateElement implements JRAlignment, JRFont, JRCommonText, TextFormat
JRTemplatePrintText,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fontName |
protected java.lang.Float |
fontsize |
protected java.lang.String |
formatFactoryClass |
protected java.lang.Boolean |
isBold |
protected java.lang.Boolean |
isItalic |
protected java.lang.Boolean |
isPdfEmbedded |
protected java.lang.Boolean |
isStrikeThrough |
protected java.lang.Boolean |
isUnderline |
protected JRLineBox |
lineBox |
protected java.lang.String |
localeCode |
protected JRParagraph |
paragraph |
protected java.lang.String |
pattern |
protected java.lang.String |
pdfEncoding |
protected java.lang.String |
pdfFontName |
protected java.lang.String |
timeZoneId |
protected java.lang.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.
|
java.awt.Color |
getDefaultLineColor() |
JRFont |
getFont()
Deprecated.
|
java.lang.String |
getFontName() |
float |
getFontsize() |
int |
getFontSize()
Deprecated.
Replaced by
getFontsize(). |
java.lang.String |
getFormatFactoryClass() |
int |
getHashCode()
Returns a hash code to be used for the deduplicate map.
|
HorizontalAlignEnum |
getHorizontalAlignmentValue()
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(). |
java.lang.String |
getLinkTarget()
Returns the hyperlink target name.
|
java.lang.String |
getLinkType()
Returns the hyperlink type.
|
java.lang.String |
getLocaleCode() |
java.lang.String |
getMarkup()
Returns the text markup.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
java.lang.String |
getOwnFontName() |
java.lang.Float |
getOwnFontsize() |
java.lang.Integer |
getOwnFontSize()
Deprecated.
Replaced by
getOwnFontsize(). |
HorizontalAlignEnum |
getOwnHorizontalAlignmentValue() |
LineSpacingEnum |
getOwnLineSpacingValue()
Deprecated.
Replaced by
JRParagraph.getOwnLineSpacing(). |
java.lang.String |
getOwnMarkup() |
java.lang.String |
getOwnPdfEncoding() |
java.lang.String |
getOwnPdfFontName() |
RotationEnum |
getOwnRotationValue()
Gets the text own rotation.
|
VerticalAlignEnum |
getOwnVerticalAlignmentValue() |
JRParagraph |
getParagraph() |
java.lang.String |
getPattern() |
java.lang.String |
getPdfEncoding() |
java.lang.String |
getPdfFontName() |
RotationEnum |
getRotationValue()
Gets the text rotation.
|
JRStyle |
getStyle()
Returns this object's style.
|
java.lang.String |
getTimeZoneId() |
java.lang.String |
getValueClassName() |
VerticalAlignEnum |
getVerticalAlignmentValue()
Gets the text vertical alignment.
|
boolean |
isBold() |
boolean |
isIdentical(java.lang.Object object)
Determines if this instance is identical to another object.
|
boolean |
isItalic() |
java.lang.Boolean |
isOwnBold() |
java.lang.Boolean |
isOwnItalic() |
java.lang.Boolean |
isOwnPdfEmbedded() |
java.lang.Boolean |
isOwnStrikeThrough() |
java.lang.Boolean |
isOwnUnderline() |
boolean |
isPdfEmbedded() |
boolean |
isStrikeThrough() |
boolean |
isUnderline() |
void |
setBold(boolean isBold) |
void |
setBold(java.lang.Boolean isBold)
Alternative setBold method which allows also to reset
the "own" isBold property.
|
void |
setFontName(java.lang.String fontName) |
void |
setFontSize(java.lang.Float fontSize)
Method which allows also to reset the "own" size property.
|
void |
setFontSize(int fontSize)
Deprecated.
Replaced by
setFontSize(Float). |
void |
setFontSize(java.lang.Integer fontSize)
Deprecated.
Replaced by
setFontSize(Float). |
void |
setFormatFactoryClass(java.lang.String formatFactoryClass) |
void |
setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
Sets the text horizontal alignment.
|
void |
setItalic(boolean isItalic) |
void |
setItalic(java.lang.Boolean isItalic)
Alternative setItalic method which allows also to reset
the "own" isItalic property.
|
void |
setLineSpacing(LineSpacingEnum lineSpacing)
Deprecated.
Replaced by
JRParagraph.setLineSpacing(LineSpacingEnum). |
protected void |
setLinkTarget(java.lang.String linkTarget) |
void |
setLinkType(java.lang.String linkType)
Sets the hyperlink type.
|
void |
setLocaleCode(java.lang.String localeCode) |
void |
setMarkup(java.lang.String markup)
Sets the text markup attribute.
|
void |
setPattern(java.lang.String pattern) |
void |
setPdfEmbedded(boolean isPdfEmbedded) |
void |
setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset
the "own" isPdfEmbedded property.
|
void |
setPdfEncoding(java.lang.String pdfEncoding) |
void |
setPdfFontName(java.lang.String pdfFontName) |
void |
setRotation(RotationEnum rotationValue)
Sets the text rotation.
|
protected void |
setStaticText(JRStaticText staticText) |
void |
setStrikeThrough(boolean isStrikeThrough) |
void |
setStrikeThrough(java.lang.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(java.lang.String timeZoneId) |
void |
setUnderline(boolean isUnderline) |
void |
setUnderline(java.lang.Boolean isUnderline)
Alternative setUnderline method which allows also to reset
the "own" isUnderline property.
|
void |
setValueClassName(java.lang.String valueClassName) |
void |
setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
Gets the text vertical alignment.
|
addTemplateHash, getBackcolor, getBaseStyle, getDefaultStyleProvider, getForecolor, getHeight, getId, getKey, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPropertiesMap, getStyleNameReference, 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 java.lang.String fontName
protected java.lang.Boolean isBold
protected java.lang.Boolean isItalic
protected java.lang.Boolean isUnderline
protected java.lang.Boolean isStrikeThrough
protected java.lang.Float fontsize
protected java.lang.String pdfFontName
protected java.lang.String pdfEncoding
protected java.lang.Boolean isPdfEmbedded
protected java.lang.String valueClassName
protected java.lang.String pattern
protected java.lang.String formatFactoryClass
protected java.lang.String localeCode
protected java.lang.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()
JRAlignmentgetHorizontalAlignmentValue in interface JRAlignmentHorizontalAlignEnumpublic HorizontalAlignEnum getOwnHorizontalAlignmentValue()
getOwnHorizontalAlignmentValue in interface JRAlignmentpublic void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
JRAlignmentsetHorizontalAlignment in interface JRAlignmenthorizontalAlignmentValue - a value representing one of the horizontal alignment constants in HorizontalAlignEnumpublic VerticalAlignEnum getVerticalAlignmentValue()
JRAlignmentgetVerticalAlignmentValue in interface JRAlignmentVerticalAlignEnumpublic VerticalAlignEnum getOwnVerticalAlignmentValue()
getOwnVerticalAlignmentValue in interface JRAlignmentpublic void setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
JRAlignmentsetVerticalAlignment in interface JRAlignmentverticalAlignmentValue - a value representing one of the vertical alignment constants in VerticalAlignEnumpublic 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 java.lang.String getMarkup()
JRCommonTextgetMarkup in interface JRCommonTextpublic java.lang.String getOwnMarkup()
getOwnMarkup in interface JRCommonTextpublic void setMarkup(java.lang.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 java.lang.String getFontName()
getFontName in interface JRFontpublic java.lang.String getOwnFontName()
getOwnFontName in interface JRFontpublic void setFontName(java.lang.String fontName)
setFontName in interface JRFontpublic void setBold(java.lang.Boolean isBold)
public java.lang.Boolean isOwnItalic()
isOwnItalic in interface JRFontpublic void setItalic(java.lang.Boolean isItalic)
public boolean isUnderline()
isUnderline in interface JRFontpublic java.lang.Boolean isOwnUnderline()
isOwnUnderline in interface JRFontpublic void setUnderline(boolean isUnderline)
setUnderline in interface JRFontpublic void setUnderline(java.lang.Boolean isUnderline)
setUnderline in interface JRFontpublic boolean isStrikeThrough()
isStrikeThrough in interface JRFontpublic java.lang.Boolean isOwnStrikeThrough()
isOwnStrikeThrough in interface JRFontpublic void setStrikeThrough(boolean isStrikeThrough)
setStrikeThrough in interface JRFontpublic void setStrikeThrough(java.lang.Boolean isStrikeThrough)
setStrikeThrough in interface JRFontpublic float getFontsize()
getFontsize in interface JRCommonTextgetFontsize in interface JRFontpublic java.lang.Float getOwnFontsize()
getOwnFontsize in interface JRFontpublic void setFontSize(java.lang.Float fontSize)
setFontSize in interface JRFontpublic int getFontSize()
getFontsize().getFontSize in interface JRCommonTextgetFontSize in interface JRFontpublic java.lang.Integer getOwnFontSize()
getOwnFontsize().getOwnFontSize in interface JRFontpublic void setFontSize(int fontSize)
setFontSize(Float).setFontSize in interface JRFontpublic void setFontSize(java.lang.Integer fontSize)
setFontSize(Float).setFontSize in interface JRFontpublic java.lang.String getPdfFontName()
getPdfFontName in interface JRFontpublic java.lang.String getOwnPdfFontName()
getOwnPdfFontName in interface JRFontpublic void setPdfFontName(java.lang.String pdfFontName)
setPdfFontName in interface JRFontpublic java.lang.String getPdfEncoding()
getPdfEncoding in interface JRFontpublic java.lang.String getOwnPdfEncoding()
getOwnPdfEncoding in interface JRFontpublic void setPdfEncoding(java.lang.String pdfEncoding)
setPdfEncoding in interface JRFontpublic boolean isPdfEmbedded()
isPdfEmbedded in interface JRFontpublic java.lang.Boolean isOwnPdfEmbedded()
isOwnPdfEmbedded in interface JRFontpublic void setPdfEmbedded(boolean isPdfEmbedded)
setPdfEmbedded in interface JRFontpublic void setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
setPdfEmbedded in interface JRFontpublic JRStyle getStyle()
JRStyleContainergetStyle in interface JRStyleContainergetStyle in class JRTemplateElementpublic java.lang.String getPattern()
getPattern in interface TextFormatpublic void setPattern(java.lang.String pattern)
public java.lang.String getValueClassName()
getValueClassName in interface TextFormatpublic void setValueClassName(java.lang.String valueClassName)
public java.lang.String getFormatFactoryClass()
getFormatFactoryClass in interface TextFormatpublic void setFormatFactoryClass(java.lang.String formatFactoryClass)
public java.lang.String getLocaleCode()
getLocaleCode in interface TextFormatpublic void setLocaleCode(java.lang.String localeCode)
public java.lang.String getTimeZoneId()
getTimeZoneId in interface TextFormatpublic void setTimeZoneId(java.lang.String timeZoneId)
public java.lang.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(java.lang.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(java.lang.String linkTarget)
public java.lang.String getLinkTarget()
The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
public java.awt.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(java.lang.Object object)
DeduplicableisIdentical in interface Deduplicableobject - the object to compare with this instancetrue if the two objects are identical and can be deduplicated© 2001-2010 Jaspersoft Corporation www.jaspersoft.com