net.sf.jasperreports.engine
Interface JRTextElement

All Superinterfaces:
java.lang.Cloneable, JRAlignment, JRBox, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRCommonText, JRElement, JRFont, JRPropertiesHolder, JRStyleContainer, JRVisitable
All Known Subinterfaces:
JRStaticText, JRTextField
All Known Implementing Classes:
JRBaseStaticText, JRBaseTextElement, JRBaseTextField, JRDesignStaticText, JRDesignTextElement, JRDesignTextField, JRFillStaticText, JRFillTextElement, JRFillTextField

public interface JRTextElement
extends JRElement, JRAlignment, JRBox, JRFont, JRCommonText

An abstract representation of a report text element. It provides basic functionality for static texts and text fields.

Version:
$Id: JRTextElement.java 2006 2007-12-05 14:28:33Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static byte LINE_SPACING_1_1_2
          Constant for setting spacing between lines to 50% more than normal.
static byte LINE_SPACING_DOUBLE
          Constant for setting spacing between lines to double size.
static byte LINE_SPACING_SINGLE
          Constant for setting normal spacing between lines.
static java.lang.String PROPERTY_PRINT_KEEP_FULL_TEXT
          Property used to determine whether the fill process must preserve the original text for text elements that are not able to fit their entire contents.
static java.lang.String PROPERTY_TRUNCATE_AT_CHAR
          Boolean property that determines whether text elements are to be truncated at the last character that fits.
static java.lang.String PROPERTY_TRUNCATE_SUFFIX
          Property whose value is used as a suffix for the truncated text.
static byte ROTATION_LEFT
          Constant useful for rotating the text 90 degrees counter clockwise.
static byte ROTATION_NONE
          Constant useful for displaying the text without rotating it
static byte ROTATION_RIGHT
          Constant useful for rotating the text 90 degrees clockwise.
static byte ROTATION_UPSIDE_DOWN
          Constant useful for rotating the text 180 degrees.
static byte TEXT_ALIGN_CENTER
          Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_CENTER.
static byte TEXT_ALIGN_JUSTIFIED
          Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_JUSTIFIED.
static byte TEXT_ALIGN_LEFT
          Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_LEFT.
static byte TEXT_ALIGN_RIGHT
          Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_RIGHT.
 
Fields inherited from interface net.sf.jasperreports.engine.JRElement
MODE_OPAQUE, MODE_TRANSPARENT, POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, POSITION_TYPE_FIX_RELATIVE_TO_TOP, POSITION_TYPE_FLOAT, STRETCH_TYPE_NO_STRETCH, STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT
 
Fields inherited from interface net.sf.jasperreports.engine.JRAlignment
HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_TOP
 
Fields inherited from interface net.sf.jasperreports.engine.JRFont
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAME
 
Method Summary
 JRBox getBox()
          Deprecated. Replaced by JRBoxContainer.getLineBox()
 JRFont getFont()
          Deprecated.  
 byte getTextAlignment()
          Deprecated. Replaced by JRAlignment.getHorizontalAlignment().
 void setLineSpacing(byte lineSpacing)
          Sets the line spacing.
 void setLineSpacing(java.lang.Byte lineSpacing)
           
 void setRotation(byte rotation)
          Sets the text rotation.
 void setRotation(java.lang.Byte rotation)
           
 void setStyledText(boolean isStyledText)
          Specifies whether the text can contain style tags.
 void setStyledText(java.lang.Boolean isStyledText)
           
 void setTextAlignment(byte horizontalAlignment)
          Deprecated. Replaced by JRAlignment.setHorizontalAlignment(byte).
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressions, getElementGroup, getHeight, getKey, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRAlignment
getHorizontalAlignment, getOwnHorizontalAlignment, getOwnVerticalAlignment, getVerticalAlignment, setHorizontalAlignment, setHorizontalAlignment, setVerticalAlignment, setVerticalAlignment
 
Methods inherited from interface net.sf.jasperreports.engine.JRBox
getBorder, getBorderColor, getBottomBorder, getBottomBorderColor, getBottomPadding, getLeftBorder, getLeftBorderColor, getLeftPadding, getOwnBorder, getOwnBorderColor, getOwnBottomBorder, getOwnBottomBorderColor, getOwnBottomPadding, getOwnLeftBorder, getOwnLeftBorderColor, getOwnLeftPadding, getOwnPadding, getOwnRightBorder, getOwnRightBorderColor, getOwnRightPadding, getOwnTopBorder, getOwnTopBorderColor, getOwnTopPadding, getPadding, getRightBorder, getRightBorderColor, getRightPadding, getTopBorder, getTopBorderColor, getTopPadding, setBorder, setBorder, setBorderColor, setBottomBorder, setBottomBorder, setBottomBorderColor, setBottomPadding, setBottomPadding, setLeftBorder, setLeftBorder, setLeftBorderColor, setLeftPadding, setLeftPadding, setPadding, setPadding, setRightBorder, setRightBorder, setRightBorderColor, setRightPadding, setRightPadding, setTopBorder, setTopBorder, setTopBorderColor, setTopPadding, setTopPadding
 
Methods inherited from interface net.sf.jasperreports.engine.JRFont
getFontName, getFontSize, getOwnFontName, getOwnFontSize, getOwnPdfEncoding, getOwnPdfFontName, getOwnSize, getPdfEncoding, getPdfFontName, getReportFont, getSize, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, setBold, setBold, setFontName, setFontSize, setFontSize, setItalic, setItalic, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setReportFont, setSize, setSize, setStrikeThrough, setStrikeThrough, setUnderline, setUnderline
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonText
getFontSize, getHeight, getLineSpacing, getOwnLineSpacing, getOwnRotation, getRotation, getWidth, isOwnStyledText, isStyledText
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor, getLineBox
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 

Field Detail

PROPERTY_PRINT_KEEP_FULL_TEXT

static final java.lang.String PROPERTY_PRINT_KEEP_FULL_TEXT
Property used to determine whether the fill process must preserve the original text for text elements that are not able to fit their entire contents.

When this property is set, the engine saves the original text in the print text object along with the index at which the text is to be truncated by the print object.

This property can be set at the following levels (listed in the order of precedence):

See Also:
JRPrintText.getFullText(), JRPrintText.getText(), JRPrintText.getTextTruncateIndex(), Constant Field Values

PROPERTY_TRUNCATE_AT_CHAR

static final java.lang.String PROPERTY_TRUNCATE_AT_CHAR
Boolean property that determines whether text elements are to be truncated at the last character that fits.

By default, when the entire text of a text element does not fit the element's area, the text is truncated at the last word that fits the area. This property can instruct the engine to truncate the text at the last character that fits.

The property can be set at the same levels as PROPERTY_PRINT_KEEP_FULL_TEXT.

See Also:
Constant Field Values

PROPERTY_TRUNCATE_SUFFIX

static final java.lang.String PROPERTY_TRUNCATE_SUFFIX
Property whose value is used as a suffix for the truncated text.

The suffix is appended to the text when truncation occurs. If the property is not defined or empty (which is the case by default), no suffix will be used when the text is truncated.

The property can be set at the same levels as PROPERTY_PRINT_KEEP_FULL_TEXT.

See Also:
Constant Field Values

TEXT_ALIGN_LEFT

static final byte TEXT_ALIGN_LEFT
Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_LEFT.
See Also:
Constant Field Values

TEXT_ALIGN_CENTER

static final byte TEXT_ALIGN_CENTER
Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_CENTER.
See Also:
Constant Field Values

TEXT_ALIGN_RIGHT

static final byte TEXT_ALIGN_RIGHT
Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_RIGHT.
See Also:
Constant Field Values

TEXT_ALIGN_JUSTIFIED

static final byte TEXT_ALIGN_JUSTIFIED
Deprecated. Replaced by JRAlignment.HORIZONTAL_ALIGN_JUSTIFIED.
See Also:
Constant Field Values

ROTATION_NONE

static final byte ROTATION_NONE
Constant useful for displaying the text without rotating it

See Also:
Constant Field Values

ROTATION_LEFT

static final byte ROTATION_LEFT
Constant useful for rotating the text 90 degrees counter clockwise.

See Also:
Constant Field Values

ROTATION_RIGHT

static final byte ROTATION_RIGHT
Constant useful for rotating the text 90 degrees clockwise.

See Also:
Constant Field Values

ROTATION_UPSIDE_DOWN

static final byte ROTATION_UPSIDE_DOWN
Constant useful for rotating the text 180 degrees.

See Also:
Constant Field Values

LINE_SPACING_SINGLE

static final byte LINE_SPACING_SINGLE
Constant for setting normal spacing between lines.

See Also:
Constant Field Values

LINE_SPACING_1_1_2

static final byte LINE_SPACING_1_1_2
Constant for setting spacing between lines to 50% more than normal.

See Also:
Constant Field Values

LINE_SPACING_DOUBLE

static final byte LINE_SPACING_DOUBLE
Constant for setting spacing between lines to double size.

See Also:
Constant Field Values
Method Detail

getTextAlignment

byte getTextAlignment()
Deprecated. Replaced by JRAlignment.getHorizontalAlignment().

Gets the text horizontal alignment.

Returns:
a value representing one of the horizontal alignment constants in JRAlignment

setTextAlignment

void setTextAlignment(byte horizontalAlignment)
Deprecated. Replaced by JRAlignment.setHorizontalAlignment(byte).

Sets the text horizontal alignment.

Parameters:
horizontalAlignment - a value representing one of the horizontal alignment constants in JRAlignment

setRotation

void setRotation(byte rotation)
Sets the text rotation.

Parameters:
rotation - a value representing one of the rotation constants in this class

setRotation

void setRotation(java.lang.Byte rotation)

setLineSpacing

void setLineSpacing(byte lineSpacing)
Sets the line spacing.

Parameters:
lineSpacing - a value representing one of the line spacing constants in this class

setLineSpacing

void setLineSpacing(java.lang.Byte lineSpacing)

setStyledText

void setStyledText(boolean isStyledText)
Specifies whether the text can contain style tags.


setStyledText

void setStyledText(java.lang.Boolean isStyledText)

getBox

JRBox getBox()
Deprecated. Replaced by JRBoxContainer.getLineBox()

Returns an object containing all border and padding properties for this text element


getFont

JRFont getFont()
Deprecated. 

Returns an object containing all font properties for this text element



© 2001-2006 JasperSoft Corporation www.jaspersoft.com