Modifier and Type | Class and Description |
---|---|
static class |
JRStyledText.Run |
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_CANNOT_COPY_CHARACTERS |
static String |
PROPERTY_AWT_IGNORE_MISSING_FONT |
Constructor and Description |
---|
JRStyledText() |
JRStyledText(Locale locale) |
JRStyledText(Locale locale,
String text) |
JRStyledText(Locale locale,
String text,
Map<AttributedCharacterIterator.Attribute,Object> globalAttributes) |
Modifier and Type | Method and Description |
---|---|
void |
addRun(JRStyledText.Run run) |
void |
append(String text) |
protected Object |
clone() |
protected static Map<AttributedCharacterIterator.Attribute,Object> |
cloneAttributesMap(Map<AttributedCharacterIterator.Attribute,Object> attributes) |
JRStyledText |
cloneText()
Clones this object.
|
AttributedString |
getAttributedString() |
AttributedString |
getAwtAttributedString(JasperReportsContext jasperReportsContext,
boolean ignoreMissingFont)
Returns an attributed string that contains the AWT font attribute, as the font is actually loaded.
|
Map<AttributedCharacterIterator.Attribute,Object> |
getGlobalAttributes() |
Locale |
getLocale() |
List<JRStyledText.Run> |
getRuns() |
String |
getText() |
void |
insert(String str,
short[] offsets)
Inserts a string at specified positions in the styled text.
|
int |
length() |
void |
setGlobalAttributes(Map<AttributedCharacterIterator.Attribute,Object> attributes) |
public static final String EXCEPTION_MESSAGE_KEY_CANNOT_COPY_CHARACTERS
public static final String PROPERTY_AWT_IGNORE_MISSING_FONT
public JRStyledText()
public JRStyledText(Locale locale)
public JRStyledText(Locale locale, String text, Map<AttributedCharacterIterator.Attribute,Object> globalAttributes)
public void append(String text)
public void addRun(JRStyledText.Run run)
public int length()
public String getText()
public Locale getLocale()
public AttributedString getAttributedString()
public AttributedString getAwtAttributedString(JasperReportsContext jasperReportsContext, boolean ignoreMissingFont)
public List<JRStyledText.Run> getRuns()
public void setGlobalAttributes(Map<AttributedCharacterIterator.Attribute,Object> attributes)
public Map<AttributedCharacterIterator.Attribute,Object> getGlobalAttributes()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected static Map<AttributedCharacterIterator.Attribute,Object> cloneAttributesMap(Map<AttributedCharacterIterator.Attribute,Object> attributes)
public JRStyledText cloneText()
public void insert(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 stringCopyright © 2016. All rights reserved.