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_OVERFLOW, PROPERTY_SCALE_FONT_STEP_LIMITband, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, dynamicTransferProperties, elementGroup, EXCEPTION_MESSAGE_KEY_INVALID_BOOKMARK_LEVEL, 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 void |
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.
|
JRExpression |
getBookmarkLevelExpression()
Returns an expression whose value represents the bookmark level (starting from 1) corresponding to this 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) |
TextAdjustEnum |
getTextAdjust()
Gets the text adjust type.
|
protected TextFormat |
getTextFormat() |
protected TimeZone |
getTimeZone() |
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()
Deprecated.
Replaced by
getTextAdjust(). |
boolean |
prepare(int availableHeight,
boolean isOverflow) |
protected void |
registerTemplate(JRStyle style,
JRTemplateElement template) |
protected void |
resolveElement(JRPrintElement element,
byte evaluation)
Resolves an element.
|
protected boolean |
scaleFontToFit() |
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)
Deprecated.
Replaced by
setTextAdjust(TextAdjustEnum). |
void |
setTextAdjust(TextAdjustEnum textAdjust)
Sets the text adjust type.
|
protected TimeZone |
toFormatTimeZone(String timezoneId) |
void |
visit(JRVisitor visitor) |
chopTextElement, ensureTextMeasurer, evaluateStyle, getDefaultLineColor, getFont, getFontName, getFontsize, getHorizontalTextAlign, getLeadingOffset, getLineBox, getLineBreakOffsets, getLineSpacingFactor, getMarkup, getMarkupProcessor, getModeValue, getOwnFontName, getOwnFontsize, getOwnHorizontalTextAlign, getOwnMarkup, getOwnPdfEncoding, getOwnPdfFontName, getOwnRotationValue, getOwnVerticalTextAlign, getParagraph, getPdfEncoding, getPdfFontName, getPrintLineBox, getPrintParagraph, getProcessedStyledText, getRawText, getRotationValue, getRunDirectionValue, getStyledText, getStyledTextAttributes, getTextEnd, getTextHeight, getTextStart, getTextString, getTextTruncateSuffix, getTextWidth, getVerticalTextAlign, isBold, isConsumeSpaceOnOverflow, isCutParagraphToContinueInOverflow, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, keepFullText, processMarkupText, reset, resetTextChunk, rewind, scaleFontStepLimit, setBold, setBold, setCutParagraphToContinueInOverflow, setFontName, setFontSize, setHeight, setHorizontalTextAlign, setItalic, setItalic, setLeadingOffset, setLineBreakOffsets, setLineSpacingFactor, setMarkup, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setPrintText, setRawText, setRotation, setStrikeThrough, setStrikeThrough, setTextEnd, setTextHeight, setTextStart, setTextTruncateSuffix, setTextWidth, setUnderline, setUnderline, setVerticalTextAlign, setWidth_moveDependantElements, _stretchElement, _stretchElementToHeight, addDependantElement, addDynamicProperty, clone, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, collectStyleProviderDelayedEvaluations, delayedEvaluate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, getBackcolor, getBand, getBookmarkLevel, 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, hasPropertiesgetUUIDgetHorizontalTextAlign, getOwnHorizontalTextAlign, getOwnVerticalTextAlign, getVerticalTextAlign, setHorizontalTextAlign, setVerticalTextAligngetFontName, getFontsize, getOwnFontName, getOwnFontsize, getOwnPdfEncoding, getOwnPdfFontName, getPdfEncoding, getPdfFontName, isBold, isItalic, isOwnBold, isOwnItalic, isOwnPdfEmbedded, isOwnStrikeThrough, isOwnUnderline, isPdfEmbedded, isStrikeThrough, isUnderline, setBold, setBold, setFontName, setFontSize, setItalic, setItalic, setPdfEmbedded, setPdfEmbedded, setPdfEncoding, setPdfFontName, setStrikeThrough, setStrikeThrough, setUnderline, setUnderlinegetFontsize, getMarkup, getOwnMarkup, getOwnRotationValue, getRotationValue, 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()
getTextAdjust().JRTextFieldisStretchWithOverflow in interface JRTextFieldpublic void setStretchWithOverflow(boolean isStretchWithOverflow)
setTextAdjust(TextAdjustEnum).JRTextFieldsetStretchWithOverflow in interface JRTextFieldpublic TextAdjustEnum getTextAdjust()
JRTextFieldgetTextAdjust in interface JRTextFieldTextAdjustEnumpublic void setTextAdjust(TextAdjustEnum textAdjust)
JRTextFieldsetTextAdjust in interface JRTextFieldtextAdjust - a value representing one of the text adjust type constants in TextAdjustEnumpublic 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 getBookmarkLevelExpression()
JRAnchorgetBookmarkLevelExpression in interface JRAnchorpublic 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 getTimeZone()
getTimeZone in class JRFillElementprotected void determineOwnTimeZone()
public boolean prepare(int availableHeight,
boolean isOverflow)
throws JRException
prepare in class JRFillTextElementJRExceptionpublic 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 JRFillTextElementprotected boolean scaleFontToFit()
scaleFontToFit in class JRFillTextElementCopyright © 2020 TIBCO Software Inc.. All rights reserved.