org.pentaho.reporting.engine.classic.core.elementfactory
Class TextElementFactory

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
      extended by org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory
Direct Known Subclasses:
BandElementFactory, LabelElementFactory, MessageFieldElementFactory, ResourceLabelElementFactory, ResourceMessageElementFactory, TextFieldElementFactory

public abstract class TextElementFactory
extends ElementFactory

The text element factory is the abstract base class for all text element factory implementations. It provides common properties shared among all text elements.

Author:
Thomas Morgner

Method Summary
 Boolean getBold()
          Returns the state of the bold flag for the font.
 Boolean getEmbedFont()
          Returns the font embedding flag for the new text elements.
 String getEncoding()
          Returns the font encoding used to write the text.
 String getFontName()
          Returns the name of the font that should be used to print the text.
 Integer getFontSize()
          Returns the font size in points.
 Boolean getItalic()
          Returns the state of the italic flag for the font.
 Float getLineHeight()
          Returns the lineheight defined for the text element.
 Float getMaximumLetterSpacing()
          Returns the defined maximum letter spacing for a text element.
 Float getMinimumLetterSpacing()
          Returns the defined minimum letter spacing for a text element.
 Float getOptimumLetterSpacing()
          Return optimum letter spacing for a text element.
 String getReservedLiteral()
          Returns the defined reserved literal, which should be appended to the text to signal text, which was not completly printed.
 Boolean getStrikethrough()
          Returns the state of the strike through flag for the font.
 Boolean getTrimTextContent()
          Returns, whether the text lines should be trimmed.
 Boolean getUnderline()
          Returns the state of the underline flag for the font.
 VerticalTextAlign getVerticalTextAlignment()
          Returns the defined vertical text alignment for this element.
 WhitespaceCollapse getWhitespaceCollapse()
          Returns how the layouter treats whitespaces in the text of a text-element.
 TextWrap getWrap()
          Returns how and when text-wrapping should occur inside a text element.
 Boolean getWrapText()
          Returns, whether the text should be wrapped in Excel-cells.
 void setBold(Boolean bold)
          Defines the state of the bold flag for the font.
 void setEmbedFont(Boolean embedFont)
          Defines that the font should be embedded if possible.
 void setEncoding(String encoding)
          Defines the font encoding used to write the text.
 void setFontName(String fontName)
          Defines the name of the font that should be used to print the text.
 void setFontSize(Integer fontSize)
          Returns the font size in points.
 void setItalic(Boolean italic)
          Defines the state of the italic flag for the font.
 void setLineHeight(Float lineHeight)
          Defines the lineheight defined for the text element.
 void setMaximumLetterSpacing(Float maximumLetterSpacing)
          Defines the maximum letter spacing for a text element.
 void setMinimumLetterSpacing(Float minimumLetterSpacing)
          Defines the minimum letter spacing for a text element.
 void setOptimumLetterSpacing(Float optimumLetterSpacing)
          Defines the optimum letter spacing for a text element.
 void setReservedLiteral(String reservedLiteral)
          Defines the defined reserved literal, which should be appended to the text to signal text, which was not completly printed.
 void setStrikethrough(Boolean strikethrough)
          Defines the state of the strike through flag for the font.
 void setTrimTextContent(Boolean trimTextContent)
          Defines, whether the text lines should be trimmed.
 void setUnderline(Boolean underline)
          Defines the state of the underline flag for the font.
 void setVerticalTextAlignment(VerticalTextAlign verticalTextAlignment)
          Defines the vertical text alignment for this element.
 void setWhitespaceCollapse(WhitespaceCollapse whitespaceCollapse)
          Defines how to treat whitespaces in the text of a text-element.
 void setWrap(TextWrap wrap)
          Defines how and when text-wrapping should occur inside a text element.
 void setWrapText(Boolean wrapText)
          Defines, whether the text should be wrapped in excel cells.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
createElement, getAbsolutePosition, getAvoidPagebreaks, getBackgroundColor, getBorderBottomColor, getBorderBottomLeftRadius, getBorderBottomLeftRadiusHeight, getBorderBottomLeftRadiusWidth, getBorderBottomRightRadius, getBorderBottomRightRadiusHeight, getBorderBottomRightRadiusWidth, getBorderBottomStyle, getBorderBottomWidth, getBorderBreakColor, getBorderBreakStyle, getBorderBreakWidth, getBorderColor, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRadius, getBorderRadiusHeight, getBorderRadiusWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderStyle, getBorderTopColor, getBorderTopLeftRadius, getBorderTopLeftRadiusHeight, getBorderTopLeftRadiusWidth, getBorderTopRightRadius, getBorderTopRightRadiusHeight, getBorderTopRightRadiusWidth, getBorderTopStyle, getBorderTopWidth, getBorderWidth, getColor, getDynamicHeight, getFontSmooth, getHeight, getHorizontalAlignment, getHRefTarget, getHRefTitle, getHRefWindow, getLayoutCachable, getMaximumHeight, getMaximumSize, getMaximumWidth, getMinimumHeight, getMinimumSize, getMinimumWidth, getName, getOrphans, getOverflowX, getOverflowY, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredSize, getUseMinChunkWidth, getVerticalAlignment, getVisible, getWidows, getWidth, getX, getY, setAbsolutePosition, setAvoidPagebreaks, setBackgroundColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadiusHeight, setBorderBottomLeftRadiusWidth, setBorderBottomRightRadius, setBorderBottomRightRadiusHeight, setBorderBottomRightRadiusWidth, setBorderBottomStyle, setBorderBottomWidth, setBorderBreakColor, setBorderBreakStyle, setBorderBreakWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRadius, setBorderRadiusHeight, setBorderRadiusWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadiusHeight, setBorderTopLeftRadiusWidth, setBorderTopRightRadius, setBorderTopRightRadiusHeight, setBorderTopRightRadiusWidth, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setColor, setDynamicHeight, setFontSmooth, setHeight, setHorizontalAlignment, setHRefTarget, setHRefTitle, setHRefWindow, setLayoutCachable, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setName, setOrphans, setOverflowX, setOverflowY, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPreferredSize, setUseMinChunkWidth, setVerticalAlignment, setVisible, setWidows, setWidth, setX, setY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.