net.sf.jasperreports.engine
Interface JRTextField

All Superinterfaces:
java.lang.Cloneable, JRAlignment, JRAnchor, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRCommonText, JRElement, JRFont, JRHyperlink, JRIdentifiable, JRParagraphContainer, 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 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
 
Fields inherited from interface net.sf.jasperreports.engine.JRTextElement
PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX
 
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
 
Method Summary
 JRGroup getEvaluationGroup()
          Gets the evaluation group for this text field.
 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.
 JRExpression getPatternExpression()
          Gets the pattern expression, in case the patter needs to be dynamic.
 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.JRElement
collectExpressions, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, 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.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRAlignment
getHorizontalAlignmentValue, getOwnHorizontalAlignmentValue, getOwnVerticalAlignmentValue, getVerticalAlignmentValue, setHorizontalAlignment, setVerticalAlignment
 
Methods inherited from interface net.sf.jasperreports.engine.JRFont
getFontName, getFontSize, getOwnFontName, getOwnFontSize, getOwnPdfEncoding, getOwnPdfFontName, getPdfEncoding, getPdfFontName, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, setBold, setBold, setFontName, setFontSize, setFontSize, setItalic, setItalic, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setStrikeThrough, setStrikeThrough, setUnderline, setUnderline
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonText
getFontSize, getLineSpacingValue, getMarkup, getOwnLineSpacingValue, getOwnMarkup, getOwnRotationValue, getRotationValue, setLineSpacing, setMarkup, setRotation
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor, getLineBox
 
Methods inherited from interface net.sf.jasperreports.engine.JRParagraphContainer
getParagraph
 
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
 

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.


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:
EvaluationTimeEnum.GROUP

getExpression

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


getPatternExpression

JRExpression getPatternExpression()
Gets the pattern expression, in case the patter needs to be dynamic.

See Also:
getPattern()


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com