Class JRTemplateText

    • Field Detail

      • 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
    • Method Detail

      • setStaticText

        protected void setStaticText​(JRStaticText staticText)
      • setTextField

        protected void setTextField​(JRTextField textField)
      • setTextElement

        protected void setTextElement​(JRTextElement textElement)
      • setTextFormat

        public void setTextFormat​(TextFormat textFormat)
      • copyLineBox

        public void copyLineBox​(JRLineBox box)
        Copies box attributes.
        Parameters:
        box - the object to copy attributes from
      • copyParagraph

        public void copyParagraph​(JRParagraph prg)
        Copies paragraph attributes.
        Parameters:
        prg - the object to copy attributes from
      • getModeValue

        public ModeEnum getModeValue()
        Description copied from interface: JRCommonElement
        Returns 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:
        getModeValue in interface JRCommonElement
        Overrides:
        getModeValue in class JRTemplateElement
      • getMarkup

        public java.lang.String getMarkup()
        Description copied from interface: JRCommonText
        Returns the text markup.
        Specified by:
        getMarkup in interface JRCommonText
      • setMarkup

        public void setMarkup​(java.lang.String markup)
        Sets the text markup attribute.
        Specified by:
        setMarkup in interface JRCommonText
        Parameters:
        markup - the markup attribute
        See Also:
        getMarkup()
      • getHyperlinkTypeValue

        public HyperlinkTypeEnum getHyperlinkTypeValue()
        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. O * When hyperlink is of custom type, CUSTOM is returned.

        Returns:
        one of the hyperlink type constants
        See Also:
        getLinkType()
      • getHyperlinkTargetValue

        public HyperlinkTargetEnum getHyperlinkTargetValue()
        Retrieves the hyperlink target name for the element.

        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.

        Returns:
        one of the hyperlink target name constants
        See Also:
        getLinkTarget()
      • getFontName

        public java.lang.String getFontName()
        Specified by:
        getFontName in interface JRFont
      • getOwnFontName

        public java.lang.String getOwnFontName()
        Specified by:
        getOwnFontName in interface JRFont
      • setFontName

        public void setFontName​(java.lang.String fontName)
        Specified by:
        setFontName in interface JRFont
      • isBold

        public boolean isBold()
        Specified by:
        isBold in interface JRFont
      • isOwnBold

        public java.lang.Boolean isOwnBold()
        Specified by:
        isOwnBold in interface JRFont
      • setBold

        public void setBold​(java.lang.Boolean isBold)
        Alternative setBold method which allows also to reset the "own" isBold property.
        Specified by:
        setBold in interface JRFont
      • isItalic

        public boolean isItalic()
        Specified by:
        isItalic in interface JRFont
      • isOwnItalic

        public java.lang.Boolean isOwnItalic()
        Specified by:
        isOwnItalic in interface JRFont
      • setItalic

        public void setItalic​(java.lang.Boolean isItalic)
        Alternative setItalic method which allows also to reset the "own" isItalic property.
        Specified by:
        setItalic in interface JRFont
      • isUnderline

        public boolean isUnderline()
        Specified by:
        isUnderline in interface JRFont
      • isOwnUnderline

        public java.lang.Boolean isOwnUnderline()
        Specified by:
        isOwnUnderline in interface JRFont
      • setUnderline

        public void setUnderline​(java.lang.Boolean isUnderline)
        Alternative setUnderline method which allows also to reset the "own" isUnderline property.
        Specified by:
        setUnderline in interface JRFont
      • isOwnStrikeThrough

        public java.lang.Boolean isOwnStrikeThrough()
        Specified by:
        isOwnStrikeThrough in interface JRFont
      • setStrikeThrough

        public void setStrikeThrough​(java.lang.Boolean isStrikeThrough)
        Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.
        Specified by:
        setStrikeThrough in interface JRFont
      • getOwnFontsize

        public java.lang.Float getOwnFontsize()
        Specified by:
        getOwnFontsize in interface JRFont
      • setFontSize

        public void setFontSize​(java.lang.Float fontSize)
        Method which allows also to reset the "own" size property.
        Specified by:
        setFontSize in interface JRFont
      • getPdfFontName

        public java.lang.String getPdfFontName()
        Specified by:
        getPdfFontName in interface JRFont
      • getOwnPdfFontName

        public java.lang.String getOwnPdfFontName()
        Specified by:
        getOwnPdfFontName in interface JRFont
      • setPdfFontName

        public void setPdfFontName​(java.lang.String pdfFontName)
        Specified by:
        setPdfFontName in interface JRFont
      • getPdfEncoding

        public java.lang.String getPdfEncoding()
        Specified by:
        getPdfEncoding in interface JRFont
      • getOwnPdfEncoding

        public java.lang.String getOwnPdfEncoding()
        Specified by:
        getOwnPdfEncoding in interface JRFont
      • setPdfEncoding

        public void setPdfEncoding​(java.lang.String pdfEncoding)
        Specified by:
        setPdfEncoding in interface JRFont
      • isPdfEmbedded

        public boolean isPdfEmbedded()
        Specified by:
        isPdfEmbedded in interface JRFont
      • isOwnPdfEmbedded

        public java.lang.Boolean isOwnPdfEmbedded()
        Specified by:
        isOwnPdfEmbedded in interface JRFont
      • setPdfEmbedded

        public void setPdfEmbedded​(java.lang.Boolean isPdfEmbedded)
        Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.
        Specified by:
        setPdfEmbedded in interface JRFont
      • getPattern

        public java.lang.String getPattern()
        Specified by:
        getPattern in interface TextFormat
      • setPattern

        public void setPattern​(java.lang.String pattern)
      • setValueClassName

        public void setValueClassName​(java.lang.String valueClassName)
      • setFormatFactoryClass

        public void setFormatFactoryClass​(java.lang.String formatFactoryClass)
      • setLocaleCode

        public void setLocaleCode​(java.lang.String localeCode)
      • setTimeZoneId

        public void setTimeZoneId​(java.lang.String timeZoneId)
      • getLinkType

        public java.lang.String getLinkType()
        Returns the hyperlink type.

        The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.

        Returns:
        the hyperlink type
      • setLinkType

        public void setLinkType​(java.lang.String linkType)
        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.

        Parameters:
        linkType - the hyperlink type
      • setLinkTarget

        protected void setLinkTarget​(java.lang.String linkTarget)
      • getLinkTarget

        public java.lang.String getLinkTarget()
        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.

        Returns:
        the hyperlink type
      • getHashCode

        public int getHashCode()
        Description copied from interface: Deduplicable
        Returns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwh Deduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.
        Specified by:
        getHashCode in interface Deduplicable
        Returns:
        deduplication hash code
      • isIdentical

        public boolean isIdentical​(java.lang.Object object)
        Description copied from interface: Deduplicable
        Determines if this instance is identical to another object.
        Specified by:
        isIdentical in interface Deduplicable
        Parameters:
        object - the object to compare with this instance
        Returns:
        true if the two objects are identical and can be deduplicated