net.sf.jasperreports.engine.util
public class JRStyledTextParser extends java.lang.Object implements org.xml.sax.ErrorHandler
Constructor and Description |
---|
JRStyledTextParser()
Deprecated.
Replaced by
getInstance() . |
Modifier and Type | Method and Description |
---|---|
void |
error(org.xml.sax.SAXParseException e) |
void |
fatalError(org.xml.sax.SAXParseException e) |
static JRStyledTextParser |
getInstance()
Return a cached instance.
|
static java.util.Locale |
getLocale() |
JRStyledText |
getStyledText(java.util.Map parentAttributes,
java.lang.String text,
boolean isStyledText)
Deprecated.
Replaced by
getStyledText(Map, String, boolean, Locale) . |
JRStyledText |
getStyledText(java.util.Map parentAttributes,
java.lang.String text,
boolean isStyledText,
java.util.Locale locale)
Creates a styled text object by either parsing a styled text String or
by wrapping an unstyled String.
|
JRStyledText |
parse(java.util.Map attributes,
java.lang.String text)
Deprecated.
Replaced by
parse(Map, String, Locale) . |
JRStyledText |
parse(java.util.Map attributes,
java.lang.String text,
java.util.Locale locale) |
static void |
setLocale(java.util.Locale locale) |
void |
warning(org.xml.sax.SAXParseException e) |
java.lang.String |
write(JRStyledText styledText)
Outputs a styled text String given a styled text instance.
|
java.lang.String |
write(JRStyledText styledText,
int startIndex,
int endIndex)
Outputs the String representation of a styled text chunk.
|
java.lang.String |
write(java.util.Map parentAttrs,
java.text.AttributedCharacterIterator iterator,
java.lang.String text)
Outputs a styled text String given a set of element-level styled text
attributes and a styled text in the form of a String text and an iterator
of style attributes.
|
void |
writeChunk(java.lang.StringBuffer sbuffer,
java.util.Map parentAttrs,
java.util.Map attrs,
java.lang.String chunk) |
public JRStyledTextParser()
getInstance()
.public static JRStyledTextParser getInstance()
public static void setLocale(java.util.Locale locale)
public static java.util.Locale getLocale()
public JRStyledText parse(java.util.Map attributes, java.lang.String text) throws org.xml.sax.SAXException
parse(Map, String, Locale)
.org.xml.sax.SAXException
public JRStyledText parse(java.util.Map attributes, java.lang.String text, java.util.Locale locale) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public JRStyledText getStyledText(java.util.Map parentAttributes, java.lang.String text, boolean isStyledText)
getStyledText(Map, String, boolean, Locale)
.public JRStyledText getStyledText(java.util.Map parentAttributes, java.lang.String text, boolean isStyledText, java.util.Locale locale)
parentAttributes
- the element-level styled text attributestext
- the (either styled or unstyled) textisStyledText
- flag indicating that the text is styledlocale
- the locale for the textpublic java.lang.String write(JRStyledText styledText)
styledText
- the styled text objectpublic java.lang.String write(java.util.Map parentAttrs, java.text.AttributedCharacterIterator iterator, java.lang.String text)
parentAttrs
- the element-level styled text attributesiterator
- iterator of styled text attributestext
- the textpublic java.lang.String write(JRStyledText styledText, int startIndex, int endIndex)
styledText
- the styled textstartIndex
- the start indexendIndex
- the end indexwrite(Map, AttributedCharacterIterator, String)
public void writeChunk(java.lang.StringBuffer sbuffer, java.util.Map parentAttrs, java.util.Map attrs, java.lang.String chunk)
public void error(org.xml.sax.SAXParseException e)
error
in interface org.xml.sax.ErrorHandler
public void fatalError(org.xml.sax.SAXParseException e)
fatalError
in interface org.xml.sax.ErrorHandler
public void warning(org.xml.sax.SAXParseException e)
warning
in interface org.xml.sax.ErrorHandler
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com