net.sf.jasperreports.engine
Interface JRTextField

All Superinterfaces:
java.lang.Cloneable, JRAlignment, JRAnchor, JRBox, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRCommonText, JRElement, JRFont, JRHyperlink, JRPropertiesHolder, JRStyleContainer, JRTextElement, JRVisitable
All Known Implementing Classes:
JRBaseTextField, JRDesignTextField, JRFillTextField

public interface JRTextField
extends JRTextElement, JRAnchor, JRHyperlink

An abstract representation of a report static text. It provides functionality for static texts.

Version:
$Id: JRTextField.java 4004 2010-10-25 06:49:40Z teodord $
Author:
Teodor Danciu ([email protected])

Field Summary
static java.lang.String STANDARD_DATE_FORMAT_DEFAULT
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_DEFAULT
static java.lang.String STANDARD_DATE_FORMAT_FULL
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_FULL
static java.lang.String STANDARD_DATE_FORMAT_HIDE
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_HIDE
static java.lang.String STANDARD_DATE_FORMAT_LONG
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_LONG
static java.lang.String STANDARD_DATE_FORMAT_MEDIUM
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_MEDIUM
static java.lang.String STANDARD_DATE_FORMAT_SEPARATOR
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_SEPARATOR
static java.lang.String STANDARD_DATE_FORMAT_SHORT
          Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_SHORT
 
Fields inherited from interface net.sf.jasperreports.engine.JRTextElement
LINE_SPACING_1_1_2, LINE_SPACING_DOUBLE, LINE_SPACING_SINGLE, PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX, ROTATION_LEFT, ROTATION_NONE, ROTATION_RIGHT, ROTATION_UPSIDE_DOWN, TEXT_ALIGN_CENTER, TEXT_ALIGN_JUSTIFIED, TEXT_ALIGN_LEFT, TEXT_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
 
Fields inherited from interface net.sf.jasperreports.engine.JRCommonText
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXT
 
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
 
Fields inherited from interface net.sf.jasperreports.engine.JRHyperlink
HYPERLINK_TARGET_BLANK, HYPERLINK_TARGET_CUSTOM, HYPERLINK_TARGET_PARENT, HYPERLINK_TARGET_SELF, HYPERLINK_TARGET_TOP, HYPERLINK_TYPE_CUSTOM, HYPERLINK_TYPE_LOCAL_ANCHOR, HYPERLINK_TYPE_LOCAL_PAGE, HYPERLINK_TYPE_NONE, HYPERLINK_TYPE_NULL, HYPERLINK_TYPE_REFERENCE, HYPERLINK_TYPE_REMOTE_ANCHOR, HYPERLINK_TYPE_REMOTE_PAGE
 
Method Summary
 JRGroup getEvaluationGroup()
          Gets the evaluation group for this text field.
 byte getEvaluationTime()
          Deprecated. Replaced by getEvaluationTimeValue().
 EvaluationTimeEnum getEvaluationTimeValue()
          Gets the evaluation time for this text field.
 JRExpression getExpression()
          Gets the expression for this field.
 java.lang.String getOwnPattern()
           
 java.lang.String getPattern()
          Gets the pattern used for this text field.
 boolean isBlankWhenNull()
          Indicates whether an empty string will be displayed if the field's expression evaluates to null.
 java.lang.Boolean isOwnBlankWhenNull()
           
 boolean isStretchWithOverflow()
          Specifies whether the text field will stretch vertically if its text does not fit in one line.
 void setBlankWhenNull(boolean isBlank)
          Specifies whether an empty string sholuld be displayed if the field's expression evaluates to null.
 void setBlankWhenNull(java.lang.Boolean isBlank)
           
 void setPattern(java.lang.String pattern)
          Sets the pattern used for this text field.
 void setStretchWithOverflow(boolean isStretchWithOverflow)
          Set to true if the text field should stretch vertically if its text does not fit in one line.
 
Methods inherited from interface net.sf.jasperreports.engine.JRTextElement
getBox, getFont, getTextAlignment, setStyledText, setStyledText, setTextAlignment
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressions, getElementGroup, getKey, getPositionType, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, 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.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRAlignment
getHorizontalAlignment, getHorizontalAlignmentValue, getOwnHorizontalAlignment, getOwnHorizontalAlignmentValue, getOwnVerticalAlignment, getOwnVerticalAlignmentValue, getVerticalAlignment, getVerticalAlignmentValue, setHorizontalAlignment, setHorizontalAlignment, setHorizontalAlignment, setVerticalAlignment, 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, getLineSpacing, getLineSpacingValue, getMarkup, getOwnLineSpacing, getOwnLineSpacingValue, getOwnMarkup, getOwnRotation, getOwnRotationValue, getRotation, getRotationValue, isOwnStyledText, isStyledText, setLineSpacing, setLineSpacing, setLineSpacing, setMarkup, setRotation, setRotation, setRotation
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getMode, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnMode, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode, setMode, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor, getLineBox
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRAnchor
getAnchorNameExpression, getBookmarkLevel
 
Methods inherited from interface net.sf.jasperreports.engine.JRHyperlink
getHyperlinkAnchorExpression, getHyperlinkPageExpression, getHyperlinkParameters, getHyperlinkReferenceExpression, getHyperlinkTarget, getHyperlinkTooltipExpression, getHyperlinkType, getHyperlinkTypeValue, getLinkTarget, getLinkType
 

Field Detail

STANDARD_DATE_FORMAT_DEFAULT

static final java.lang.String STANDARD_DATE_FORMAT_DEFAULT
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_DEFAULT
Used in the date pattern to specify the default style.

See Also:
DateFormat.DEFAULT, Constant Field Values

STANDARD_DATE_FORMAT_SHORT

static final java.lang.String STANDARD_DATE_FORMAT_SHORT
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_SHORT
Used in the date pattern to specify the short style.

See Also:
DateFormat.SHORT, Constant Field Values

STANDARD_DATE_FORMAT_MEDIUM

static final java.lang.String STANDARD_DATE_FORMAT_MEDIUM
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_MEDIUM
Used in the date pattern to specify the medium style.

See Also:
DateFormat.MEDIUM, Constant Field Values

STANDARD_DATE_FORMAT_LONG

static final java.lang.String STANDARD_DATE_FORMAT_LONG
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_LONG
Used in the date pattern to specify the long style.

See Also:
DateFormat.LONG, Constant Field Values

STANDARD_DATE_FORMAT_FULL

static final java.lang.String STANDARD_DATE_FORMAT_FULL
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_FULL
Used in the date pattern to specify the full style.

See Also:
DateFormat.FULL, Constant Field Values

STANDARD_DATE_FORMAT_HIDE

static final java.lang.String STANDARD_DATE_FORMAT_HIDE
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_HIDE
Used in the date pattern to specify that the date or time should not be included.

See Also:
Constant Field Values

STANDARD_DATE_FORMAT_SEPARATOR

static final java.lang.String STANDARD_DATE_FORMAT_SEPARATOR
Deprecated. replaced by DefaultFormatFactory.STANDARD_DATE_FORMAT_SEPARATOR
Used in the date format pattern to separate the date and time styles.

See Also:
Constant Field Values
Method Detail

isStretchWithOverflow

boolean isStretchWithOverflow()
Specifies whether the text field will stretch vertically if its text does not fit in one line.

Returns:
true if the text field will stretch vertically, false otherwise

setStretchWithOverflow

void setStretchWithOverflow(boolean isStretchWithOverflow)
Set to true if the text field should stretch vertically if its text does not fit in one line.


getEvaluationTime

byte getEvaluationTime()
Deprecated. Replaced by getEvaluationTimeValue().


getEvaluationTimeValue

EvaluationTimeEnum getEvaluationTimeValue()
Gets the evaluation time for this text field.

Returns:
one of the evaluation time constants in JRExpression

getPattern

java.lang.String getPattern()
Gets the pattern used for this text field. The pattern will be used in a SimpleDateFormat for dates and a DecimalFormat for numeric text fields. The pattern format must follow one of these two classes formatting rules, as specified in the JDK API docs.

Returns:
a string containing the pattern.

getOwnPattern

java.lang.String getOwnPattern()

setPattern

void setPattern(java.lang.String pattern)
Sets the pattern used for this text field. The pattern will be used in a SimpleDateFormat for dates and a DecimalFormat for numeric text fields. The pattern format must follow one of these two classes formatting rules, as specified in the JDK API docs. If the pattern is incorrect, the exception thrown by formatter classes will be rethrown by the JasperReports fill engine.


isBlankWhenNull

boolean isBlankWhenNull()
Indicates whether an empty string will be displayed if the field's expression evaluates to null.

Returns:
true if an empty string will be displayed instead of null values, false otherwise

isOwnBlankWhenNull

java.lang.Boolean isOwnBlankWhenNull()

setBlankWhenNull

void setBlankWhenNull(boolean isBlank)
Specifies whether an empty string sholuld be displayed if the field's expression evaluates to null.

Parameters:
isBlank - true if an empty string will be displayed instead of null values, false otherwise

setBlankWhenNull

void setBlankWhenNull(java.lang.Boolean isBlank)

getEvaluationGroup

JRGroup getEvaluationGroup()
Gets the evaluation group for this text field. Used only when evaluation time is group.

See Also:
JRExpression.EVALUATION_TIME_GROUP

getExpression

JRExpression getExpression()
Gets the expression for this field. The result obtained after evaluating this expression will be dispayed as the field text.



Copyright © 2011. All Rights Reserved.