Package net.sf.jasperreports.engine.util
Class JRStyledText
java.lang.Object
net.sf.jasperreports.engine.util.JRStyledText
- All Implemented Interfaces:
Cloneable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJRStyledText(Locale locale) JRStyledText(Locale locale, String text) JRStyledText(Locale locale, String text, Map<AttributedCharacterIterator.Attribute, Object> globalAttributes) JRStyledText(Locale locale, String text, Map<AttributedCharacterIterator.Attribute, Object> globalAttributes, List<JRStyledText.Run> runs) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRun(JRStyledText.Run run) voidprotected Objectclone()protected static Map<AttributedCharacterIterator.Attribute,Object> cloneAttributesMap(Map<AttributedCharacterIterator.Attribute, Object> attributes) Clones this object.voidconsumeText(StyledTextRunConsumer consumer) getAwtAttributedString(JasperReportsContext jasperReportsContext, boolean ignoreMissingFont) Returns an attributed string that contains the AWT font attribute, as the font is actually loaded.getRuns()getText()voidInserts a string at specified positions in the styled text.intlength()void
-
Field Details
-
EXCEPTION_MESSAGE_KEY_CANNOT_COPY_CHARACTERS
- See Also:
-
PROPERTY_AWT_IGNORE_MISSING_FONT
- See Also:
-
PROPERTY_AWT_SUPERSCRIPT_FIX_ENABLED
- See Also:
-
-
Constructor Details
-
JRStyledText
public JRStyledText() -
JRStyledText
-
JRStyledText
-
JRStyledText
public JRStyledText(Locale locale, String text, Map<AttributedCharacterIterator.Attribute, Object> globalAttributes) -
JRStyledText
public JRStyledText(Locale locale, String text, Map<AttributedCharacterIterator.Attribute, Object> globalAttributes, List<JRStyledText.Run> runs)
-
-
Method Details
-
append
-
addRun
-
length
public int length() -
getText
-
getLocale
-
getAttributedString
-
consumeText
-
getAwtAttributedString
public AttributedString getAwtAttributedString(JasperReportsContext jasperReportsContext, boolean ignoreMissingFont) Returns an attributed string that contains the AWT font attribute, as the font is actually loaded. -
getRuns
-
setGlobalAttributes
-
getGlobalAttributes
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
cloneAttributesMap
protected static Map<AttributedCharacterIterator.Attribute,Object> cloneAttributesMap(Map<AttributedCharacterIterator.Attribute, Object> attributes) -
cloneText
Clones this object.- Returns:
- a clone of this object
-
insert
Inserts a string at specified positions in the styled text.The string is inserted in the style runs located at the insertion positions. If a style run finished right before the insertion position, the string will be part of this run (but not of the runs that start right after the insertion position).
- Parameters:
str- the string to insertoffsets- the incremental offsets of the positions at which to insert the string
-