|
Project Wonder 5.0.0.8795 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.Format
er.extensions.formatters.ERXSimpleHTMLFormatter
public class 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/interfaces inherited from class java.text.Format |
|---|
Format.Field |
| Field Summary | |
|---|---|
static Logger |
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 Logger 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.
format in class Formatobject - 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
parseObject in class FormatinString - HTML string
ParseException
public Object parseObject(String string,
ParsePosition p)
parseObject in class Formatstring - HTML stringp - current parsing position
public String stringForObjectValue(Object anObject)
throws IllegalArgumentException
anObject - string to convert
IllegalArgumentException
|
Last updated: Fri, Jan 9, 2009 04:35 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||