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
band, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, dynamicTransferProperties, elementGroup, expressionEvaluator, fillContainerContext, filler, initStyle, mergedProperties, originProvider, parent, printElementOriginator, printWhenGroupChanges, propertyExpressions, providerStyle, staticProperties, styleProviders, templates
FORMAT_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_TIMEZONE
PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAME
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXT
NO_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, getMarkup, getMarkupProcessor, getModeValue, getOwnFontName, getOwnFontsize, getOwnFontSize, getOwnHorizontalAlignmentValue, getOwnHorizontalTextAlign, getOwnMarkup, getOwnPdfEncoding, getOwnPdfFontName, getOwnRotationValue, getOwnVerticalAlignmentValue, getOwnVerticalTextAlign, getParagraph, getPdfEncoding, getPdfFontName, 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, 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, transferProperties
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
clone
getParentProperties, getPropertiesMap, hasProperties
getUUID
getHorizontalAlignmentValue, getOwnHorizontalAlignmentValue, getOwnVerticalAlignmentValue, getVerticalAlignmentValue, setHorizontalAlignment, setVerticalAlignment
getHorizontalTextAlign, getOwnHorizontalTextAlign, getOwnVerticalTextAlign, getVerticalTextAlign, setHorizontalTextAlign, setVerticalTextAlign
getFontName, 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, setUnderline
getFontsize, getMarkup, getOwnMarkup, getOwnRotationValue, getRotationValue, setMarkup, setRotation
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
getDefaultLineColor, getLineBox
getParagraph
getDefaultStyleProvider, getStyle, getStyleNameReference
protected 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()
JRTextField
isStretchWithOverflow
in interface JRTextField
public void setStretchWithOverflow(boolean isStretchWithOverflow)
JRTextField
setStretchWithOverflow
in interface JRTextField
public EvaluationTimeEnum getEvaluationTimeValue()
JREvaluation
getEvaluationTimeValue
in interface JREvaluation
getEvaluationTimeValue
in class JRFillElement
JRExpression
protected TextFormat getTextFormat()
public String getPattern()
JRTextField
getPattern
in interface JRTextField
public String getOwnPattern()
getOwnPattern
in interface JRTextField
public void setPattern(String pattern)
JRTextField
setPattern
in interface JRTextField
public boolean isBlankWhenNull()
JRTextField
null
.isBlankWhenNull
in interface JRTextField
public Boolean isOwnBlankWhenNull()
isOwnBlankWhenNull
in interface JRTextField
public void setBlankWhenNull(boolean isBlank)
JRTextField
null
.setBlankWhenNull
in interface JRTextField
isBlank
- true if an empty string will be displayed instead of null values, false otherwisepublic void setBlankWhenNull(Boolean isBlank)
setBlankWhenNull
in interface JRTextField
public 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 JRHyperlink
JRHyperlink.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 JRHyperlink
JRHyperlink.getLinkTarget()
public String getLinkTarget()
JRHyperlink
The type can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
getLinkTarget
in interface JRHyperlink
public JRGroup getEvaluationGroup()
JREvaluation
getEvaluationGroup
in interface JREvaluation
EvaluationTimeEnum.GROUP
public JRExpression getExpression()
JRTextField
getExpression
in interface JRTextField
public JRExpression getPatternExpression()
JRTextField
getPatternExpression
in interface JRTextField
JRTextField.getPattern()
public JRExpression getAnchorNameExpression()
JRAnchor
getAnchorNameExpression
in interface JRAnchor
public JRExpression getHyperlinkReferenceExpression()
JRHyperlink
getHyperlinkReferenceExpression
in interface JRHyperlink
public JRExpression getHyperlinkWhenExpression()
JRHyperlink
getHyperlinkWhenExpression
in interface JRHyperlink
public JRExpression getHyperlinkAnchorExpression()
JRHyperlink
getHyperlinkAnchorExpression
in interface JRHyperlink
public JRExpression getHyperlinkPageExpression()
JRHyperlink
getHyperlinkPageExpression
in interface JRHyperlink
protected 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 JRFillElement
protected void evaluateTextFormat(Format format, Object value, TimeZone ownTimeZone)
protected JRTemplateElement getTemplate(JRStyle style)
getTemplate
in class JRFillElement
protected void registerTemplate(JRStyle style, JRTemplateElement template)
registerTemplate
in class JRFillElement
protected boolean delayedEvaluationUpdatesTemplate()
delayedEvaluationUpdatesTemplate
in class JRFillElement
public void evaluate(byte evaluation) throws JRException
evaluate
in class JRFillElement
JRException
protected void evaluateText(byte evaluation) throws JRException
JRException
protected TimeZone determineOwnTimeZone()
public boolean prepare(int availableHeight, boolean isOverflow) throws JRException
prepare
in class JRFillElement
JRException
public JRPrintElement fill() throws JRException
fill
in class JRFillElement
JRException
protected void copy(JRPrintText text)
protected void setPrintText(JRPrintText printText, String text)
setPrintText
in class JRFillTextElement
public void collectExpressions(JRExpressionCollector collector)
collectExpressions
in interface JRElement
public void visit(JRVisitor visitor)
visit
in interface JRVisitable
protected void resolveElement(JRPrintElement element, byte evaluation) throws JRException
JRFillElement
resolveElement
in class JRFillElement
element
- the elementevaluation
- the evaluation typeJRException
public int getBookmarkLevel()
JRAnchor
getBookmarkLevel
in interface JRAnchor
NO_BOOKMARK
if no bookmark should be created for this anchorpublic JRFillCloneable createClone(JRFillCloneFactory factory)
JRFillCloneable
createClone
in interface JRFillCloneable
factory
- the clone factory to use while creating the cloneprotected void collectDelayedEvaluations()
collectDelayedEvaluations
in class JRFillElement
public JRHyperlinkParameter[] getHyperlinkParameters()
JRHyperlink
The parameters can be used by custom hyperlink types to generate dynamic links.
getHyperlinkParameters
in interface JRHyperlink
public String getLinkType()
JRHyperlink
The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
getLinkType
in interface JRHyperlink
public JRExpression getHyperlinkTooltipExpression()
JRHyperlink
getHyperlinkTooltipExpression
in interface JRHyperlink
protected boolean canOverflow()
canOverflow
in class JRFillTextElement
Copyright © 2017. All rights reserved.