public class JRStyledText
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
JRStyledText.Run |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_AWT_IGNORE_MISSING_FONT |
Constructor and Description |
---|
JRStyledText() |
JRStyledText(java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
void |
addRun(JRStyledText.Run run) |
void |
append(java.lang.String text) |
protected java.lang.Object |
clone() |
protected static java.util.Map |
cloneAttributesMap(java.util.Map attributes) |
JRStyledText |
cloneText()
Clones this object.
|
java.text.AttributedString |
getAttributedString() |
java.text.AttributedString |
getAwtAttributedString(boolean ignoreMissingFont)
Returns an attributed string that only contains standard Java text
attributes; JasperReports specific text attributes of the styled text
are ignored.
|
java.util.Map |
getGlobalAttributes() |
java.util.Locale |
getLocale() |
java.util.List |
getRuns() |
java.lang.String |
getText() |
void |
insert(java.lang.String str,
short[] offsets)
Inserts a string at specified positions in the styled text.
|
int |
length() |
void |
setGlobalAttributes(java.util.Map attributes) |
public static final java.lang.String PROPERTY_AWT_IGNORE_MISSING_FONT
public JRStyledText()
public JRStyledText(java.util.Locale locale)
public void append(java.lang.String text)
public void addRun(JRStyledText.Run run)
public int length()
public java.lang.String getText()
public java.util.Locale getLocale()
public java.text.AttributedString getAttributedString()
public java.text.AttributedString getAwtAttributedString(boolean ignoreMissingFont)
public java.util.List getRuns()
public void setGlobalAttributes(java.util.Map attributes)
public java.util.Map getGlobalAttributes()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
protected static java.util.Map cloneAttributesMap(java.util.Map attributes)
public JRStyledText cloneText()
public void insert(java.lang.String str, short[] offsets)
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).
str
- the string to insertoffsets
- the incremental offsets of the positions at which to
insert the string© 2001-2010 Jaspersoft Corporation www.jaspersoft.com