Class JRDesignTextElement
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseElement
net.sf.jasperreports.engine.design.JRDesignElement
net.sf.jasperreports.engine.design.JRDesignTextElement
- All Implemented Interfaces:
Serializable
,Cloneable
,JRChangeEventsSupport
,JRBoxContainer
,JRChild
,JRCloneable
,JRCommonElement
,JRCommonText
,JRElement
,JRFont
,JRIdentifiable
,JRParagraphContainer
,JRPropertiesHolder
,JRStyleContainer
,JRTextAlignment
,JRTextElement
,JRVisitable
- Direct Known Subclasses:
JRDesignStaticText
,JRDesignTextField
This class provides functionality common to design text elements. It provides implementation for the methods described
in JRTextElement and setters for text element attributes that can only be modified at design time.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Float
protected HorizontalTextAlignEnum
protected Boolean
protected Boolean
protected Boolean
protected Boolean
protected Boolean
protected JRLineBox
protected String
protected JRParagraph
protected String
protected String
protected RotationEnum
protected VerticalTextAlignEnum
Fields inherited from class net.sf.jasperreports.engine.design.JRDesignElement
PROPERTY_ELEMENT_GROUP, PROPERTY_HEIGHT, PROPERTY_KEY, PROPERTY_PARENT_STYLE, PROPERTY_PARENT_STYLE_NAME_REFERENCE, PROPERTY_PRINT_WHEN_EXPRESSION, PROPERTY_PRINT_WHEN_GROUP_CHANGES, PROPERTY_PROPERTY_EXPRESSIONS, PROPERTY_STYLE_EXPRESSION, PROPERTY_Y
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, mode, parentStyle, parentStyleNameReference, positionType, printWhenExpression, printWhenGroupChanges, PROPERTY_POSITION_TYPE, PROPERTY_PRINT_IN_FIRST_WHOLE_BAND, PROPERTY_PRINT_REPEATED_VALUES, PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS, PROPERTY_REMOVE_LINE_WHEN_BLANK, PROPERTY_STRETCH_TYPE, PROPERTY_WIDTH, PROPERTY_X, stretchType, styleExpression, uuid, width, x, y
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.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
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.JRTextElement
PROPERTY_PRINT_KEEP_FULL_TEXT, PROPERTY_SAVE_LINE_BREAKS, PROPERTY_TRUNCATE_AT_CHAR, PROPERTY_TRUNCATE_SUFFIX
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JRDesignTextElement
(JRDefaultStyleProvider defaultStyleProvider) Creates a new text element. -
Method Summary
Modifier and TypeMethodDescriptionclone()
float
Gets the text horizontal alignment.Returns the text markup.getMode()
Returns the element transparency mode.Gets the text own rotation.Gets the text rotation.Gets the text vertical alignment.boolean
isBold()
boolean
isItalic()
boolean
boolean
boolean
void
Alternative setBold method which allows also to reset the "own" isBold property.void
setFontName
(String fontName) void
setFontSize
(Float fontSize) Method which allows also to reset the "own" size property.void
setHorizontalTextAlign
(HorizontalTextAlignEnum horizontalTextAlign) Sets the text horizontal alignment.void
Alternative setItalic method which allows also to reset the "own" isItalic property.void
void
setPdfEmbedded
(Boolean isPdfEmbedded) Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.void
setPdfEncoding
(String pdfEncoding) void
setPdfFontName
(String pdfFontName) void
setRotation
(RotationEnum rotation) Sets the text rotation.void
setStrikeThrough
(Boolean isStrikeThrough) Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.void
setUnderline
(Boolean isUnderline) Alternative setUnderline method which allows also to reset the "own" isUnderline property.void
setVerticalTextAlign
(VerticalTextAlignEnum verticalTextAlign) Gets the text vertical alignment.Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElement
addPropertyExpression, getPropertyExpressions, getPropertyExpressionsList, removePropertyExpression, removePropertyExpression, setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setStyle, setStyleExpression, setStyleNameReference, setY
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
clone, clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getStretchType, getStyle, getStyleExpression, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setUUID, setWidth, setX
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setMode
Methods inherited from interface net.sf.jasperreports.engine.JRElement
clone, collectExpressions, getElementGroup, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Field Details
-
horizontalTextAlign
-
verticalTextAlign
-
rotation
-
markup
-
lineBox
-
paragraph
-
fontName
-
isBold
-
isItalic
-
isUnderline
-
isStrikeThrough
-
fontSize
-
pdfFontName
-
pdfEncoding
-
isPdfEmbedded
-
-
Constructor Details
-
JRDesignTextElement
Creates a new text element.
-
-
Method Details
-
getMode
Description copied from interface:JRCommonElement
Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getMode
in interfaceJRCommonElement
- Overrides:
getMode
in classJRBaseElement
-
getHorizontalTextAlign
Description copied from interface:JRTextAlignment
Gets the text horizontal alignment.- Specified by:
getHorizontalTextAlign
in interfaceJRTextAlignment
- Returns:
- a value representing one of the horizontal text alignment constants in
HorizontalTextAlignEnum
-
getOwnHorizontalTextAlign
- Specified by:
getOwnHorizontalTextAlign
in interfaceJRTextAlignment
-
setHorizontalTextAlign
Description copied from interface:JRTextAlignment
Sets the text horizontal alignment.- Specified by:
setHorizontalTextAlign
in interfaceJRTextAlignment
- Parameters:
horizontalTextAlign
- a value representing one of the horizontal text alignment constants inHorizontalTextAlignEnum
-
getVerticalTextAlign
Description copied from interface:JRTextAlignment
Gets the text vertical alignment.- Specified by:
getVerticalTextAlign
in interfaceJRTextAlignment
- Returns:
- a value representing one of the vertical text alignment constants in
VerticalTextAlignEnum
-
getOwnVerticalTextAlign
- Specified by:
getOwnVerticalTextAlign
in interfaceJRTextAlignment
-
setVerticalTextAlign
Description copied from interface:JRTextAlignment
Gets the text vertical alignment.- Specified by:
setVerticalTextAlign
in interfaceJRTextAlignment
- Parameters:
verticalTextAlign
- a value representing one of the vertical text alignment constants inVerticalTextAlignEnum
-
getRotation
Description copied from interface:JRCommonText
Gets the text rotation.- Specified by:
getRotation
in interfaceJRCommonText
- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
getOwnRotation
Description copied from interface:JRCommonText
Gets the text own rotation.- Specified by:
getOwnRotation
in interfaceJRCommonText
- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
setRotation
Description copied from interface:JRCommonText
Sets the text rotation.- Specified by:
setRotation
in interfaceJRCommonText
- Parameters:
rotation
- a value representing one of the text rotation constants inRotationEnum
-
getMarkup
Description copied from interface:JRCommonText
Returns the text markup.- Specified by:
getMarkup
in interfaceJRCommonText
-
getOwnMarkup
- Specified by:
getOwnMarkup
in interfaceJRCommonText
-
setMarkup
- Specified by:
setMarkup
in interfaceJRCommonText
-
getLineBox
- Specified by:
getLineBox
in interfaceJRBoxContainer
-
getParagraph
- Specified by:
getParagraph
in interfaceJRParagraphContainer
-
getFontName
- Specified by:
getFontName
in interfaceJRFont
-
getOwnFontName
- Specified by:
getOwnFontName
in interfaceJRFont
-
setFontName
- Specified by:
setFontName
in interfaceJRFont
-
isBold
public boolean isBold() -
isOwnBold
-
setBold
Alternative setBold method which allows also to reset the "own" isBold property. -
isItalic
public boolean isItalic() -
isOwnItalic
- Specified by:
isOwnItalic
in interfaceJRFont
-
setItalic
Alternative setItalic method which allows also to reset the "own" isItalic property. -
isUnderline
public boolean isUnderline()- Specified by:
isUnderline
in interfaceJRFont
-
isOwnUnderline
- Specified by:
isOwnUnderline
in interfaceJRFont
-
setUnderline
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderline
in interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()- Specified by:
isStrikeThrough
in interfaceJRFont
-
isOwnStrikeThrough
- Specified by:
isOwnStrikeThrough
in interfaceJRFont
-
setStrikeThrough
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThrough
in interfaceJRFont
-
getFontSize
public float getFontSize()- Specified by:
getFontSize
in interfaceJRCommonText
- Specified by:
getFontSize
in interfaceJRFont
-
getOwnFontSize
- Specified by:
getOwnFontSize
in interfaceJRFont
-
setFontSize
Method which allows also to reset the "own" size property.- Specified by:
setFontSize
in interfaceJRFont
-
getPdfFontName
- Specified by:
getPdfFontName
in interfaceJRFont
-
getOwnPdfFontName
- Specified by:
getOwnPdfFontName
in interfaceJRFont
-
setPdfFontName
- Specified by:
setPdfFontName
in interfaceJRFont
-
getPdfEncoding
- Specified by:
getPdfEncoding
in interfaceJRFont
-
getOwnPdfEncoding
- Specified by:
getOwnPdfEncoding
in interfaceJRFont
-
setPdfEncoding
- Specified by:
setPdfEncoding
in interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()- Specified by:
isPdfEmbedded
in interfaceJRFont
-
isOwnPdfEmbedded
- Specified by:
isOwnPdfEmbedded
in interfaceJRFont
-
setPdfEmbedded
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbedded
in interfaceJRFont
-
getDefaultLineColor
- Specified by:
getDefaultLineColor
in interfaceJRBoxContainer
-
clone
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classJRDesignElement
-