public class TextFormat
extends java.text.Format
AutoFormatter
class implements the automatic conversion
of line endings to <br>
HTML lists.
This implementation only supports automatically converting bullet and
numbered lists as well as line breaking.Constructor and Description |
---|
TextFormat() |
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats the object according to the standard modifiers, which are
automatic line breaks and list formatting.
|
java.lang.String |
getTagBr() |
java.lang.String |
getTagOlClose() |
java.lang.String |
getTagOlItemClose() |
java.lang.String |
getTagOlItemOpen() |
java.lang.String |
getTagOlOpen() |
java.lang.String |
getTagUlClose() |
java.lang.String |
getTagUlItemClose() |
java.lang.String |
getTagUlItemOpen() |
java.lang.String |
getTagUlOpen() |
boolean |
isAutoBr() |
boolean |
isAutoList() |
boolean |
isEscapeXML() |
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition status)
The
TextFormat class does not support parsing, so an
UnsupportedOperationException is thrown when trying to
parse. |
void |
setAutoBr(boolean autoBr) |
void |
setAutoList(boolean autoList) |
void |
setEscapeXML(boolean escapeXML) |
void |
setTagBr(java.lang.String tagBr) |
void |
setTagOlClose(java.lang.String tagOlClose) |
void |
setTagOlItemClose(java.lang.String tagOlItemClose) |
void |
setTagOlItemOpen(java.lang.String tagOlItemOpen) |
void |
setTagOlOpen(java.lang.String tagOlOpen) |
void |
setTagUlClose(java.lang.String tagUlClose) |
void |
setTagUlItemClose(java.lang.String tagUlItemClose) |
void |
setTagUlItemOpen(java.lang.String tagUlItemOpen) |
void |
setTagUlOpen(java.lang.String tagUlOpen) |
public java.lang.String getTagBr()
public void setTagBr(java.lang.String tagBr)
public java.lang.String getTagOlOpen()
public void setTagOlOpen(java.lang.String tagOlOpen)
public java.lang.String getTagOlClose()
public void setTagOlClose(java.lang.String tagOlClose)
public java.lang.String getTagOlItemOpen()
public void setTagOlItemOpen(java.lang.String tagOlItemOpen)
public java.lang.String getTagOlItemClose()
public void setTagOlItemClose(java.lang.String tagOlItemClose)
public java.lang.String getTagUlOpen()
public void setTagUlOpen(java.lang.String tagUlOpen)
public java.lang.String getTagUlClose()
public void setTagUlClose(java.lang.String tagUlClose)
public java.lang.String getTagUlItemOpen()
public void setTagUlItemOpen(java.lang.String tagUlItemOpen)
public java.lang.String getTagUlItemClose()
public void setTagUlItemClose(java.lang.String tagUlItemClose)
public boolean isAutoBr()
public void setAutoBr(boolean autoBr)
public boolean isAutoList()
public void setAutoList(boolean autoList)
public boolean isEscapeXML()
public void setEscapeXML(boolean escapeXML)
public java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition status)
TextFormat
class does not support parsing, so an
UnsupportedOperationException
is thrown when trying to
parse.parseObject
in class java.text.Format
source
- The source string to parse. Ignored.status
- The position to define parsing. Ignored.java.lang.UnsupportedOperationException
- as it is not yet implemented.public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.Format
obj
- The object to format, which must be a String or a
ClassCastException
will be thrown.toAppendTo
- Where to append the formatted data. If null
,
a new string buffer is allocated.pos
- Formatting position information. Not used.StringBuffer
containing the formatted string. This
is either the same as toAppendTo
or a newly
allocated StringBuffer
if the parameter is
null
."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"