PlainTextTagDisplayFormatterpublic class PlainTextTagDisplayFormatter extends AbstractTagDisplayFormatter
Fields Summary |
---|
private static PlainTextTagDisplayFormatter | formatter | StringBuffer | sb | StringBuffer | indent |
Constructors Summary |
---|
public PlainTextTagDisplayFormatter()
|
Methods Summary |
---|
public void | addElement(java.lang.String type, boolean value)
addElement(type, String.valueOf(value));
| public void | addElement(java.lang.String type, java.lang.String value)
sb.append(indent).append(type).append(":").append(value).append('\n");
| public void | addElement(java.lang.String type, int value)
addElement(type, String.valueOf(value));
| public void | closeHeadingElement(java.lang.String type)
decreaseLevel();
| public void | decreaseLevel()
level--;
indent = new StringBuffer(indent.substring(0, indent.length() - 2));
| public static AbstractTagDisplayFormatter | getInstanceOf()
if (formatter == null)
{
formatter = new PlainTextTagDisplayFormatter();
}
return formatter;
| public void | increaseLevel()
level++;
indent.append(" ");
| public void | openHeadingElement(java.lang.String type, java.lang.String value)
addElement(type, value);
increaseLevel();
| public void | openHeadingElement(java.lang.String type, boolean value)
openHeadingElement(type, String.valueOf(value));
| public void | openHeadingElement(java.lang.String type, int value)
openHeadingElement(type, String.valueOf(value));
| public java.lang.String | toString()
return sb.toString();
|
|