Class TextFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class TextFormat
    extends java.text.Format
    The 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.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.text.Format

        java.text.Format.Field
    • Constructor Summary

      Constructors 
      Constructor Description
      TextFormat()  
    • Constructor Detail

      • TextFormat

        public TextFormat()
    • Method Detail

      • getTagBr

        public java.lang.String getTagBr()
      • setTagBr

        public void setTagBr​(java.lang.String tagBr)
      • getTagOlOpen

        public java.lang.String getTagOlOpen()
      • setTagOlOpen

        public void setTagOlOpen​(java.lang.String tagOlOpen)
      • getTagOlClose

        public java.lang.String getTagOlClose()
      • setTagOlClose

        public void setTagOlClose​(java.lang.String tagOlClose)
      • getTagOlItemOpen

        public java.lang.String getTagOlItemOpen()
      • setTagOlItemOpen

        public void setTagOlItemOpen​(java.lang.String tagOlItemOpen)
      • getTagOlItemClose

        public java.lang.String getTagOlItemClose()
      • setTagOlItemClose

        public void setTagOlItemClose​(java.lang.String tagOlItemClose)
      • getTagUlOpen

        public java.lang.String getTagUlOpen()
      • setTagUlOpen

        public void setTagUlOpen​(java.lang.String tagUlOpen)
      • getTagUlClose

        public java.lang.String getTagUlClose()
      • setTagUlClose

        public void setTagUlClose​(java.lang.String tagUlClose)
      • getTagUlItemOpen

        public java.lang.String getTagUlItemOpen()
      • setTagUlItemOpen

        public void setTagUlItemOpen​(java.lang.String tagUlItemOpen)
      • getTagUlItemClose

        public java.lang.String getTagUlItemClose()
      • setTagUlItemClose

        public void setTagUlItemClose​(java.lang.String tagUlItemClose)
      • isAutoBr

        public boolean isAutoBr()
      • setAutoBr

        public void setAutoBr​(boolean autoBr)
      • isAutoList

        public boolean isAutoList()
      • setAutoList

        public void setAutoList​(boolean autoList)
      • isEscapeXML

        public boolean isEscapeXML()
      • setEscapeXML

        public void setEscapeXML​(boolean escapeXML)
      • parseObject

        public 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.
        Specified by:
        parseObject in class java.text.Format
        Parameters:
        source - The source string to parse. Ignored.
        status - The position to define parsing. Ignored.
        Throws:
        java.lang.UnsupportedOperationException - as it is not yet implemented.
      • format

        public 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. This implementation only supports strings and completely ignores the pos parameter.
        Specified by:
        format in class java.text.Format
        Parameters:
        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.
        Returns:
        a StringBuffer containing the formatted string. This is either the same as toAppendTo or a newly allocated StringBuffer if the parameter is null.