public class JRFillTextField extends JRFillTextElement implements JRTextField
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log |
protected Map<Pair<JRStyle,TextFormat>,JRTemplateElement> |
textTemplates |
EXCEPTION_MESSAGE_KEY_INVALID_START_INDEX, EXCEPTION_MESSAGE_KEY_MISSING_MARKUP_PROCESSOR_FACTORY, initLineBox, initParagraph, lineBox, paragraph, PROPERTY_CONSUME_SPACE_ON_OVERFLOWband, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, dynamicTransferProperties, elementGroup, expressionEvaluator, fillContainerContext, filler, initStyle, mergedProperties, originProvider, parent, printElementOriginator, printWhenGroupChanges, propertyExpressions, providerStyle, staticProperties, styleProviders, templatesFORMAT_TIMEZONE_SYSTEM, PROPERTY_FORMAT_TIMEZONE, PROPERTY_PATTERN_DATE, PROPERTY_PATTERN_DATETIME, PROPERTY_PATTERN_INTEGER, PROPERTY_PATTERN_NUMBER, PROPERTY_PATTERN_TIME, PROPERTY_SQL_DATE_FORMAT_TIMEZONE, PROPERTY_SQL_TIME_FORMAT_TIMEZONE, PROPERTY_SQL_TIMESTAMP_FORMAT_TIMEZONEPROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIXDEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAMEMARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXTNO_BOOKMARK| Modifier | Constructor and Description |
|---|---|
protected |
JRFillTextField(JRBaseFiller filler,
JRTextField textField,
JRFillObjectFactory factory) |
protected |
JRFillTextField(JRFillTextField textField,
JRFillCloneFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canOverflow() |
protected void |
collectDelayedEvaluations() |
void |
collectExpressions(JRExpressionCollector collector) |
protected void |
copy(JRPrintText text) |
JRFillCloneable |
createClone(JRFillCloneFactory factory)
Creates a working clone of itself.
|
protected JRTemplateElement |
createElementTemplate() |
protected boolean |
delayedEvaluationUpdatesTemplate() |
protected TimeZone |
determineOwnTimeZone() |
void |
evaluate(byte evaluation) |
protected void |
evaluateText(byte evaluation) |
protected void |
evaluateTextFormat(Format format,
Object value,
TimeZone ownTimeZone) |
JRPrintElement |
fill() |
protected String |
getAnchorName() |
JRExpression |
getAnchorNameExpression()
Returns an expression whose value represents the anchor name.
|
int |
getBookmarkLevel()
Returns the level of the bookmark corresponding to the anchor.
|
protected String |
getDatePattern(Object value) |
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.
|
protected Format |
getFormat(Object value,
TimeZone ownTimeZone) |
protected String |
getHyperlinkAnchor() |
JRExpression |
getHyperlinkAnchorExpression()
Returns the expression whose value represents the anchor.
|
protected Integer |
getHyperlinkPage() |
JRExpression |
getHyperlinkPageExpression()
Returns an integer representing the page index of the link.
|
JRHyperlinkParameter[] |
getHyperlinkParameters()
Returns the list of hyperlink parameters.
|
protected String |
getHyperlinkReference() |
JRExpression |
getHyperlinkReferenceExpression()
Returns the expression whose value represents the hyperlink reference.
|
byte |
getHyperlinkTarget()
Retrieves the hyperlink target for the element.
|
protected String |
getHyperlinkTooltip() |
JRExpression |
getHyperlinkTooltipExpression()
Returns the expression which will generate the hyperlink tooltip.
|
byte |
getHyperlinkType()
Deprecated.
Replaced by
getHyperlinkTypeValue(). |
HyperlinkTypeEnum |
getHyperlinkTypeValue()
Retrieves the hyperlink type for the element.
|
JRExpression |
getHyperlinkWhenExpression()
Returns the expression that is evaluated in order to decide if the hyperlink should be displayed.
|
protected JRTemplateText |
getJRTemplateText() |
String |
getLinkTarget()
Returns the hyperlink target name.
|
String |
getLinkType()
Returns the hyperlink type.
|
protected String |
getLocalizedProperty(String property) |
protected String |
getNumberPattern(Object value) |
String |
getOwnPattern() |
String |
getPattern()
Gets the pattern used for this text field.
|
JRExpression |
getPatternExpression()
Gets the pattern expression, in case the patter needs to be dynamic.
|
protected TimeZone |
getPatternTimeZone(String property) |
protected JRTemplateElement |
getTemplate(JRStyle style) |
protected String |
getTemplatePattern(Format format,
Object value) |
protected TextFormat |
getTextFormat() |
protected Object |
getValue() |
boolean |
isBlankWhenNull()
Indicates whether an empty string will be displayed if the field's expression evaluates to
null. |
Boolean |
isOwnBlankWhenNull() |
boolean |
isStretchWithOverflow()
Specifies whether the text field will stretch vertically if its text does not fit in one line.
|
boolean |
prepare(int availableHeight,
boolean isOverflow) |
protected void |
registerTemplate(JRStyle style,
JRTemplateElement template) |
protected void |
resolveElement(JRPrintElement element,
byte evaluation)
Resolves an element.
|
void |
setBlankWhenNull(boolean isBlank)
Specifies whether an empty string sholuld be displayed if the field's expression evaluates to
null. |
void |
setBlankWhenNull(Boolean isBlank) |
void |
setPattern(String pattern)
Sets the pattern used for this text field.
|
protected void |
setPrintText(JRPrintText printText,
String text) |
void |
setStretchWithOverflow(boolean isStretchWithOverflow)
Set to true if the text field should stretch vertically if its text does not fit in one line.
|
protected TimeZone |
toFormatTimeZone(String timezoneId) |
void |
visit(JRVisitor visitor) |
chopTextElement, ensureTextMeasurer, evaluateStyle, getDefaultLineColor, getFont, getFontName, getFontsize, getFontSize, getHorizontalAlignmentValue, getHorizontalTextAlign, getLeadingOffset, getLineBox, getLineBreakOffsets, getLineSpacingFactor, getLineSpacingValue, getMarkup, getMarkupProcessor, getModeValue, getOwnFontName, getOwnFontsize, getOwnFontSize, getOwnHorizontalAlignmentValue, getOwnHorizontalTextAlign, getOwnLineSpacingValue, getOwnMarkup, getOwnPdfEncoding, getOwnPdfFontName, getOwnRotationValue, getOwnVerticalAlignmentValue, getOwnVerticalTextAlign, getParagraph, getPdfEncoding, getPdfFontName, getPrintElementHeight, getPrintLineBox, getPrintParagraph, getProcessedStyledText, getRawText, getRotationValue, getRunDirectionValue, getStyledText, getStyledTextAttributes, getText, getTextEnd, getTextHeight, getTextStart, getTextTruncateSuffix, getTextWidth, getVerticalAlignmentValue, getVerticalTextAlign, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, keepFullText, processMarkupText, reset, resetTextChunk, rewind, setBold, setBold, setFontName, setFontSize, setFontSize, setFontSize, setHeight, setHorizontalAlignment, setHorizontalTextAlign, setItalic, setItalic, setLeadingOffset, setLineBreakOffsets, setLineSpacing, setLineSpacingFactor, setMarkup, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setPrintText, setRawText, setRotation, setStrikeThrough, setStrikeThrough, setTextEnd, setTextHeight, setTextStart, setTextTruncateSuffix, setTextWidth, setUnderline, setUnderline, setVerticalAlignment, setVerticalTextAlign, setWidth_moveDependantElements, _stretchElement, _stretchElementToHeight, addDependantElement, addDynamicProperty, clone, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, collectStyleProviderDelayedEvaluations, delayedEvaluate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, getBackcolor, getBand, getCollapsedHeightAbove, getCollapsedHeightBelow, getConditionalStylesContainer, getDefaultStyleProvider, getDependantElements, getDynamicProperties, getElementGroup, getElementOrigin, getElementTemplate, getEvaluatedProperties, getField, getFiller, getForecolor, getGroupElements, getHeight, getInitStyle, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParent, getParentProperties, getPositionTypeValue, getPrepareHeight, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getRelativeY, getStretchHeight, getStretchTypeValue, getStyle, getStyleNameReference, getStyleResolver, getUUID, getVariable, getWidth, getX, getY, hasDynamicProperties, hasDynamicProperty, hasProperties, initDelayedEvaluationPrint, initDelayedEvaluations, initStyleProviders, isAlreadyPrinted, isAutoEvaluateNow, isDelayedStyleEvaluation, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, performDelayedEvaluation, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setCollapsedHeightAbove, setCollapsedHeightBelow, setConditionalStylesContainer, setCurrentEvaluation, setExpressionEvaluator, setForecolor, setMode, setOriginProvider, setPositionType, setPrepareHeight, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setX, setY, stretchElement, stretchElementToContainer, stretchElementToElementGroup, stretchElementToHeight, stretchHeightFinal, transferProperties, transferPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setXclonegetParentProperties, getPropertiesMap, hasPropertiesgetUUIDgetHorizontalAlignmentValue, getOwnHorizontalAlignmentValue, getOwnVerticalAlignmentValue, getVerticalAlignmentValue, setHorizontalAlignment, setVerticalAlignmentgetHorizontalTextAlign, getOwnHorizontalTextAlign, getOwnVerticalTextAlign, getVerticalTextAlign, setHorizontalTextAlign, setVerticalTextAligngetFontName, getFontsize, getFontSize, getOwnFontName, getOwnFontsize, getOwnFontSize, getOwnPdfEncoding, getOwnPdfFontName, getPdfEncoding, getPdfFontName, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, setBold, setBold, setFontName, setFontSize, setFontSize, setFontSize, setItalic, setItalic, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setStrikeThrough, setStrikeThrough, setUnderline, setUnderlinegetFontsize, getFontSize, getLineSpacingValue, getMarkup, getOwnLineSpacingValue, getOwnMarkup, getOwnRotationValue, getRotationValue, setLineSpacing, setMarkup, setRotationgetBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setModegetDefaultLineColor, getLineBoxgetParagraphgetDefaultStyleProvider, getStyle, getStyleNameReferenceprotected static final org.apache.commons.logging.Log log
protected final Map<Pair<JRStyle,TextFormat>,JRTemplateElement> textTemplates
protected JRFillTextField(JRBaseFiller filler, JRTextField textField, JRFillObjectFactory factory)
protected JRFillTextField(JRFillTextField textField, JRFillCloneFactory factory)
public boolean isStretchWithOverflow()
JRTextFieldisStretchWithOverflow in interface JRTextFieldpublic void setStretchWithOverflow(boolean isStretchWithOverflow)
JRTextFieldsetStretchWithOverflow in interface JRTextFieldpublic EvaluationTimeEnum getEvaluationTimeValue()
JREvaluationgetEvaluationTimeValue in interface JREvaluationgetEvaluationTimeValue in class JRFillElementJRExpressionprotected TextFormat getTextFormat()
public String getPattern()
JRTextFieldgetPattern in interface JRTextFieldpublic String getOwnPattern()
getOwnPattern in interface JRTextFieldpublic void setPattern(String pattern)
JRTextFieldsetPattern in interface JRTextFieldpublic boolean isBlankWhenNull()
JRTextFieldnull.isBlankWhenNull in interface JRTextFieldpublic Boolean isOwnBlankWhenNull()
isOwnBlankWhenNull in interface JRTextFieldpublic void setBlankWhenNull(boolean isBlank)
JRTextFieldnull.setBlankWhenNull in interface JRTextFieldisBlank - true if an empty string will be displayed instead of null values, false otherwisepublic void setBlankWhenNull(Boolean isBlank)
setBlankWhenNull in interface JRTextFieldpublic byte getHyperlinkType()
getHyperlinkTypeValue().public HyperlinkTypeEnum getHyperlinkTypeValue()
JRHyperlink
The actual hyperlink type is determined by getLinkType().
This method can is used to determine whether the hyperlink type is one of the
built-in types or a custom type.
When hyperlink is of custom type, CUSTOM is returned.
getHyperlinkTypeValue in interface JRHyperlinkJRHyperlink.getLinkType()public byte getHyperlinkTarget()
JRHyperlink
The actual hyperlink target is determined by getLinkTarget().
This method can is used to determine whether the hyperlink target is one of the
built-in target names or a custom one.
When hyperlink has a custom target name, HyperlinkTargetEnum.CUSTOM is returned.
getHyperlinkTarget in interface JRHyperlinkJRHyperlink.getLinkTarget()public String getLinkTarget()
JRHyperlinkThe type can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
getLinkTarget in interface JRHyperlinkpublic JRGroup getEvaluationGroup()
JREvaluationgetEvaluationGroup in interface JREvaluationEvaluationTimeEnum.GROUPpublic JRExpression getExpression()
JRTextFieldgetExpression in interface JRTextFieldpublic JRExpression getPatternExpression()
JRTextFieldgetPatternExpression in interface JRTextFieldJRTextField.getPattern()public JRExpression getAnchorNameExpression()
JRAnchorgetAnchorNameExpression in interface JRAnchorpublic JRExpression getHyperlinkReferenceExpression()
JRHyperlinkgetHyperlinkReferenceExpression in interface JRHyperlinkpublic JRExpression getHyperlinkWhenExpression()
JRHyperlinkgetHyperlinkWhenExpression in interface JRHyperlinkpublic JRExpression getHyperlinkAnchorExpression()
JRHyperlinkgetHyperlinkAnchorExpression in interface JRHyperlinkpublic JRExpression getHyperlinkPageExpression()
JRHyperlinkgetHyperlinkPageExpression in interface JRHyperlinkprotected Object getValue()
protected String getAnchorName()
protected String getHyperlinkReference()
protected String getHyperlinkAnchor()
protected Integer getHyperlinkPage()
protected String getHyperlinkTooltip()
protected JRTemplateText getJRTemplateText()
protected JRTemplateElement createElementTemplate()
createElementTemplate in class JRFillElementprotected void evaluateTextFormat(Format format, Object value, TimeZone ownTimeZone)
protected JRTemplateElement getTemplate(JRStyle style)
getTemplate in class JRFillElementprotected void registerTemplate(JRStyle style, JRTemplateElement template)
registerTemplate in class JRFillElementprotected boolean delayedEvaluationUpdatesTemplate()
delayedEvaluationUpdatesTemplate in class JRFillElementpublic void evaluate(byte evaluation)
throws JRException
evaluate in class JRFillElementJRExceptionprotected void evaluateText(byte evaluation)
throws JRException
JRExceptionprotected TimeZone determineOwnTimeZone()
public boolean prepare(int availableHeight,
boolean isOverflow)
throws JRException
prepare in class JRFillElementJRExceptionpublic JRPrintElement fill() throws JRException
fill in class JRFillElementJRExceptionprotected void copy(JRPrintText text)
protected void setPrintText(JRPrintText printText, String text)
setPrintText in class JRFillTextElementpublic void collectExpressions(JRExpressionCollector collector)
collectExpressions in interface JRElementpublic void visit(JRVisitor visitor)
visit in interface JRVisitableprotected void resolveElement(JRPrintElement element, byte evaluation) throws JRException
JRFillElementresolveElement in class JRFillElementelement - the elementevaluation - the evaluation typeJRExceptionpublic int getBookmarkLevel()
JRAnchorgetBookmarkLevel in interface JRAnchorNO_BOOKMARK if no bookmark should be created for this anchorpublic JRFillCloneable createClone(JRFillCloneFactory factory)
JRFillCloneablecreateClone in interface JRFillCloneablefactory - the clone factory to use while creating the cloneprotected void collectDelayedEvaluations()
collectDelayedEvaluations in class JRFillElementpublic JRHyperlinkParameter[] getHyperlinkParameters()
JRHyperlinkThe parameters can be used by custom hyperlink types to generate dynamic links.
getHyperlinkParameters in interface JRHyperlinkpublic String getLinkType()
JRHyperlinkThe type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
getLinkType in interface JRHyperlinkpublic JRExpression getHyperlinkTooltipExpression()
JRHyperlinkgetHyperlinkTooltipExpression in interface JRHyperlinkprotected boolean canOverflow()
canOverflow in class JRFillTextElementCopyright © 2017. All rights reserved.