Class TextElementFactory

    • Constructor Detail

      • TextElementFactory

        protected TextElementFactory()
        Default Constructor.
    • Method Detail

      • getVerticalTextAlignment

        public VerticalTextAlign getVerticalTextAlignment()
        Returns the defined vertical text alignment for this element.
        Returns:
        the vertical text alignment property or null, if the property is not defined.
      • setVerticalTextAlignment

        public void setVerticalTextAlignment​(VerticalTextAlign verticalTextAlignment)
        Defines the vertical text alignment for this element.
        Parameters:
        verticalTextAlignment - the vertical text alignment property or null, if the property should not be defined.
      • getWrap

        public TextWrap getWrap()
        Returns how and when text-wrapping should occur inside a text element.
        Returns:
        the defined text-wrap property.
        See Also:
        TextWrap
      • setWrap

        public void setWrap​(TextWrap wrap)
        Defines how and when text-wrapping should occur inside a text element.
        Parameters:
        wrap - the defined text-wrap property.
        See Also:
        TextWrap
      • getWhitespaceCollapse

        public WhitespaceCollapse getWhitespaceCollapse()
        Returns how the layouter treats whitespaces in the text of a text-element.
        Returns:
        the white space collapse constant or null, if undefined.
        See Also:
        WhitespaceCollapse
      • setWhitespaceCollapse

        public void setWhitespaceCollapse​(WhitespaceCollapse whitespaceCollapse)
        Defines how to treat whitespaces in the text of a text-element.
        Parameters:
        whitespaceCollapse - the white space collapse constant or null, if undefined.
        See Also:
        WhitespaceCollapse
      • getMaximumLetterSpacing

        public Float getMaximumLetterSpacing()
        Returns the defined maximum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line.
        Returns:
        the maximum letter spacing or null, if undefined.
      • setMaximumLetterSpacing

        public void setMaximumLetterSpacing​(Float maximumLetterSpacing)
        Defines the maximum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line.
        Parameters:
        maximumLetterSpacing - the maximum letter spacing.
      • getMinimumLetterSpacing

        public Float getMinimumLetterSpacing()
        Returns the defined minimum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line and controls how much extra space is applied between the characters of a text.
        Returns:
        the minimum letter spacing or null, if undefined.
      • setMinimumLetterSpacing

        public void setMinimumLetterSpacing​(Float minimumLetterSpacing)
        Defines the minimum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line and controls how much extra space is applied between the characters of a text.
        Parameters:
        minimumLetterSpacing - the minimum letter spacing or null, if undefined.
      • getOptimumLetterSpacing

        public Float getOptimumLetterSpacing()
        Return optimum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line.
        Returns:
        the optimum letter spacing or null, if undefined.
      • setOptimumLetterSpacing

        public void setOptimumLetterSpacing​(Float optimumLetterSpacing)
        Defines the optimum letter spacing for a text element. This property controls how the justify-alignment distributes extra space on a line.
        Parameters:
        optimumLetterSpacing - the optimum letter spacing or null, if undefined.
      • getEmbedFont

        public Boolean getEmbedFont()
        Returns the font embedding flag for the new text elements. Font embedding is only used in some output targets.
        Returns:
        the font embedding flag.
      • setEmbedFont

        public void setEmbedFont​(Boolean embedFont)
        Defines that the font should be embedded if possible.
        Parameters:
        embedFont - embedds the font if possible.
      • getFontName

        public String getFontName()
        Returns the name of the font that should be used to print the text.
        Returns:
        the font name.
      • setFontName

        public void setFontName​(String fontName)
        Defines the name of the font that should be used to print the text.
        Parameters:
        fontName - the name of the font.
      • getBold

        public Boolean getBold()
        Returns the state of the bold flag for the font. This method may return null to indicate that that value should be inherited from the parents.
        Returns:
        the bold-flag.
      • setBold

        public void setBold​(Boolean bold)
        Defines the state of the bold flag for the font. This value may be set to null to indicate that that value should be inherited from the parents.
        Parameters:
        bold - the bold-flag.
      • getItalic

        public Boolean getItalic()
        Returns the state of the italic flag for the font. This method may return null to indicate that that value should be inherited from the parents.
        Returns:
        the italic-flag.
      • setItalic

        public void setItalic​(Boolean italic)
        Defines the state of the italic flag for the font. This value may be set to null to indicate that that value should be inherited from the parents.
        Parameters:
        italic - the italic-flag.
      • getUnderline

        public Boolean getUnderline()
        Returns the state of the underline flag for the font. This method may return null to indicate that that value should be inherited from the parents.
        Returns:
        the underline-flag.
      • setUnderline

        public void setUnderline​(Boolean underline)
        Defines the state of the underline flag for the font. This value may be set to null to indicate that that value should be inherited from the parents.
        Parameters:
        underline - the underline-flag.
      • getStrikethrough

        public Boolean getStrikethrough()
        Returns the state of the strike through flag for the font. This method may return null to indicate that that value should be inherited from the parents.
        Returns:
        the strike-through-flag.
      • setStrikethrough

        public void setStrikethrough​(Boolean strikethrough)
        Defines the state of the strike through flag for the font. This value may be set to null to indicate that that value should be inherited from the parents.
        Parameters:
        strikethrough - the strikethrough-flag.
      • getFontSize

        public Integer getFontSize()
        Returns the font size in points.
        Returns:
        the font size.
      • setFontSize

        public void setFontSize​(Integer fontSize)
        Returns the font size in points.
        Parameters:
        fontSize - the font size.
      • getLineHeight

        public Float getLineHeight()
        Returns the lineheight defined for the text element. The lineheight must be greater than the font size, or this value will be ignored.
        Returns:
        the line height.
      • setLineHeight

        public void setLineHeight​(Float lineHeight)
        Defines the lineheight defined for the text element. The lineheight must be greater than the font size, or this value will be ignored.
        Parameters:
        lineHeight - the line height.
      • getEncoding

        public String getEncoding()
        Returns the font encoding used to write the text. This parameter is only used by some output targets and will be ignored otherwise.
        Returns:
        the font encoding.
      • setEncoding

        public void setEncoding​(String encoding)
        Defines the font encoding used to write the text. This parameter is only used by some output targets and will be ignored otherwise.
        Parameters:
        encoding - the font encoding.
      • getReservedLiteral

        public String getReservedLiteral()
        Returns the defined reserved literal, which should be appended to the text to signal text, which was not completly printed.
        Returns:
        the reserved literal.
      • setReservedLiteral

        public void setReservedLiteral​(String reservedLiteral)
        Defines the defined reserved literal, which should be appended to the text to signal text, which was not completly printed.
        Parameters:
        reservedLiteral - the reserved literal.
      • getTrimTextContent

        public Boolean getTrimTextContent()
        Returns, whether the text lines should be trimmed.
        Returns:
        Boolean.TRUE, if the text should be trimmed, Boolean.FALSE if the text should never be trimmed or null, if the default should be applied.
      • setTrimTextContent

        public void setTrimTextContent​(Boolean trimTextContent)
        Defines, whether the text lines should be trimmed.
        Parameters:
        trimTextContent - Boolean.TRUE, if the text should be trimmed, Boolean.FALSE if the text should never be trimmed or null, if the default should be applied.
      • getWrapText

        public Boolean getWrapText()
        Returns, whether the text should be wrapped in Excel-cells.
        Returns:
        the wrap text flag.
      • setWrapText

        public void setWrapText​(Boolean wrapText)
        Defines, whether the text should be wrapped in excel cells.
        Parameters:
        wrapText - the wrap text flag.
      • applyStyle

        protected void applyStyle​(ElementStyleSheet style)
        Applies the defined element style to the given stylesheet. This is a helper function to reduce the code size of the implementors.
        Overrides:
        applyStyle in class ElementFactory
        Parameters:
        style - the stlyesheet.