|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.Format er.extensions.ERXSimpleHTMLFormatter
This is a simple class for converting ASCII strings to HTML and vice versa. In the current implementation, all this class does is convert newlines to HTML breaks and tab characters to HTML <spacer> tags.
Nested Class Summary |
Nested classes inherited from class java.text.Format |
Format.Field |
Field Summary | |
static ERXLogger |
log
logging support |
Constructor Summary | |
ERXSimpleHTMLFormatter()
|
Method Summary | |
String |
applyFormat(Object anObject)
Applies the HTML formatting to a given string object replacing ASCII formatting with HTML formatting. |
StringBuffer |
format(Object object,
StringBuffer buffer,
FieldPosition fp)
The FieldPosition is not important, so this method just calls applyFormat and appends that
string to the buffer. |
static ERXSimpleHTMLFormatter |
formatter()
Method used to retrieve the shared instance of the html formatter. |
String |
htmlStringFromString(String aString)
Converts an ASCII string into an HTML string. |
protected static String |
HTMLTab()
Simple method used to get the url to the spacer gif s.gif from the WOResourceManager. |
Object |
parseObject(String inString)
Converts an HTML string into an ASCII string. |
Object |
parseObject(String string,
ParsePosition p)
Converts an HTML string into an ASCII string starting from a given parse position. |
String |
stringForObjectValue(Object anObject)
Accessor method used to convert an ASCII string into an HTML string. |
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ERXLogger log
Constructor Detail |
public ERXSimpleHTMLFormatter()
Method Detail |
protected static String HTMLTab()
public static ERXSimpleHTMLFormatter formatter()
public String htmlStringFromString(String aString)
aString
- to be converted
public StringBuffer format(Object object, StringBuffer buffer, FieldPosition fp)
applyFormat
and appends that
string to the buffer.
object
- to be formattedbuffer
- to have the formatted object appended tofp
- ignored parameter
public String applyFormat(Object anObject) throws IllegalArgumentException
anObject
- to have the formatting applied to
IllegalArgumentException
public Object parseObject(String inString) throws ParseException
inString
- HTML string
ParseException
public Object parseObject(String string, ParsePosition p)
string
- HTML stringp
- current parsing position
public String stringForObjectValue(Object anObject) throws IllegalArgumentException
anObject
- string to convert
IllegalArgumentException
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |