Package net.sf.jasperreports.engine.base
Class JRBaseTextElement
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseElement
net.sf.jasperreports.engine.base.JRBaseTextElement
- All Implemented Interfaces:
Serializable,Cloneable,JRChangeEventsSupport,JRBoxContainer,JRChild,JRCloneable,JRCommonElement,JRCommonText,JRElement,JRFont,JRIdentifiable,JRParagraphContainer,JRPropertiesHolder,JRStyleContainer,JRTextAlignment,JRTextElement,JRVisitable
- Direct Known Subclasses:
JRBaseStaticText,JRBaseTextField
This class provides functionality common to text elements. It provides implementation for the methods described
in JRTextElement.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Floatprotected HorizontalTextAlignEnumprotected Booleanprotected Booleanprotected Booleanprotected Booleanprotected Booleanprotected JRLineBoxprotected Stringprotected JRParagraphprotected Stringprotected Stringprotected RotationEnumprotected VerticalTextAlignEnumFields 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, yFields inherited from interface net.sf.jasperreports.engine.JRCommonText
MARKUP_HTML, MARKUP_NONE, MARKUP_RTF, MARKUP_STYLED_TEXTFields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLEFields inherited from interface net.sf.jasperreports.engine.JRFont
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAMEFields 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
ConstructorsModifierConstructorDescriptionprotectedJRBaseTextElement(JRTextElement textElement, JRBaseObjectFactory factory) Initializes properties that are specific to text elements. -
Method Summary
Modifier and TypeMethodDescriptionclone()floatGets 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.booleanisBold()booleanisItalic()booleanbooleanbooleanvoidAlternative setBold method which allows also to reset the "own" isBold property.voidsetFontName(String fontName) voidsetFontSize(Float fontSize) Method which allows also to reset the "own" size property.voidsetHorizontalTextAlign(HorizontalTextAlignEnum horizontalTextAlign) Sets the text horizontal alignment.voidAlternative setItalic method which allows also to reset the "own" isItalic property.voidvoidsetPdfEmbedded(Boolean isPdfEmbedded) Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.voidsetPdfEncoding(String pdfEncoding) voidsetPdfFontName(String pdfFontName) voidsetRotation(RotationEnum rotation) Sets the text rotation.voidsetStrikeThrough(Boolean isStrikeThrough) Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.voidsetUnderline(Boolean isUnderline) Alternative setUnderline method which allows also to reset the "own" isUnderline property.voidsetVerticalTextAlign(VerticalTextAlignEnum verticalTextAlign) Gets the text vertical alignment.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, getPropertyExpressions, 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, setXMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setModeMethods 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, setXMethods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUIDMethods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasPropertiesMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReferenceMethods 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
-
JRBaseTextElement
Initializes properties that are specific to text elements. Common properties are initialized by its parent constructor.- Parameters:
textElement- an element whose properties are copied to this element. Usually it is aJRDesignTextElementthat must be transformed into an JRBaseTextElement at compile time.factory- a factory used in the compile process
-
-
Method Details
-
getHorizontalTextAlign
Description copied from interface:JRTextAlignmentGets the text horizontal alignment.- Specified by:
getHorizontalTextAlignin interfaceJRTextAlignment- Returns:
- a value representing one of the horizontal text alignment constants in
HorizontalTextAlignEnum
-
getOwnHorizontalTextAlign
- Specified by:
getOwnHorizontalTextAlignin interfaceJRTextAlignment
-
setHorizontalTextAlign
Description copied from interface:JRTextAlignmentSets the text horizontal alignment.- Specified by:
setHorizontalTextAlignin interfaceJRTextAlignment- Parameters:
horizontalTextAlign- a value representing one of the horizontal text alignment constants inHorizontalTextAlignEnum
-
getVerticalTextAlign
Description copied from interface:JRTextAlignmentGets the text vertical alignment.- Specified by:
getVerticalTextAlignin interfaceJRTextAlignment- Returns:
- a value representing one of the vertical text alignment constants in
VerticalTextAlignEnum
-
getOwnVerticalTextAlign
- Specified by:
getOwnVerticalTextAlignin interfaceJRTextAlignment
-
setVerticalTextAlign
Description copied from interface:JRTextAlignmentGets the text vertical alignment.- Specified by:
setVerticalTextAlignin interfaceJRTextAlignment- Parameters:
verticalTextAlign- a value representing one of the vertical text alignment constants inVerticalTextAlignEnum
-
getRotation
Description copied from interface:JRCommonTextGets the text rotation.- Specified by:
getRotationin interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
getOwnRotation
Description copied from interface:JRCommonTextGets the text own rotation.- Specified by:
getOwnRotationin interfaceJRCommonText- Returns:
- a value representing one of the text rotation constants in
RotationEnum
-
setRotation
Description copied from interface:JRCommonTextSets the text rotation.- Specified by:
setRotationin interfaceJRCommonText- Parameters:
rotation- a value representing one of the text rotation constants inRotationEnum
-
getMarkup
Description copied from interface:JRCommonTextReturns the text markup.- Specified by:
getMarkupin interfaceJRCommonText
-
getOwnMarkup
- Specified by:
getOwnMarkupin interfaceJRCommonText
-
setMarkup
- Specified by:
setMarkupin interfaceJRCommonText
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getParagraph
- Specified by:
getParagraphin interfaceJRParagraphContainer
-
getMode
Description copied from interface:JRCommonElementReturns 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:
getModein interfaceJRCommonElement- Overrides:
getModein classJRBaseElement
-
getFontName
- Specified by:
getFontNamein interfaceJRFont
-
getOwnFontName
- Specified by:
getOwnFontNamein interfaceJRFont
-
setFontName
- Specified by:
setFontNamein 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:
isOwnItalicin interfaceJRFont
-
setItalic
Alternative setItalic method which allows also to reset the "own" isItalic property. -
isUnderline
public boolean isUnderline()- Specified by:
isUnderlinein interfaceJRFont
-
isOwnUnderline
- Specified by:
isOwnUnderlinein interfaceJRFont
-
setUnderline
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderlinein interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()- Specified by:
isStrikeThroughin interfaceJRFont
-
isOwnStrikeThrough
- Specified by:
isOwnStrikeThroughin interfaceJRFont
-
setStrikeThrough
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThroughin interfaceJRFont
-
getFontSize
public float getFontSize()- Specified by:
getFontSizein interfaceJRCommonText- Specified by:
getFontSizein interfaceJRFont
-
getOwnFontSize
- Specified by:
getOwnFontSizein interfaceJRFont
-
setFontSize
Method which allows also to reset the "own" size property.- Specified by:
setFontSizein interfaceJRFont
-
getPdfFontName
- Specified by:
getPdfFontNamein interfaceJRFont
-
getOwnPdfFontName
- Specified by:
getOwnPdfFontNamein interfaceJRFont
-
setPdfFontName
- Specified by:
setPdfFontNamein interfaceJRFont
-
getPdfEncoding
- Specified by:
getPdfEncodingin interfaceJRFont
-
getOwnPdfEncoding
- Specified by:
getOwnPdfEncodingin interfaceJRFont
-
setPdfEncoding
- Specified by:
setPdfEncodingin interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()- Specified by:
isPdfEmbeddedin interfaceJRFont
-
isOwnPdfEmbedded
- Specified by:
isOwnPdfEmbeddedin interfaceJRFont
-
setPdfEmbedded
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbeddedin interfaceJRFont
-
getDefaultLineColor
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classJRBaseElement
-