org.apache.tapestry.html
Class InsertTextMode

java.lang.Object
  extended by org.apache.tapestry.html.InsertTextMode

public abstract class InsertTextMode
extends Object

Defines a number of ways to format multi-line text for proper renderring.

Author:
Howard Lewis Ship

Field Summary
static InsertTextMode BREAK
          Mode where each line (after the first) is preceded by a <br> tag.
static InsertTextMode PARAGRAPH
          Mode where each line is wrapped with a <p> element.
 
Constructor Summary
protected InsertTextMode(String name)
           
 
Method Summary
 String toString()
           
abstract  void writeLine(int lineNumber, String line, IMarkupWriter writer, boolean raw)
          Invoked by the InsertText component to write the next line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BREAK

public static final InsertTextMode BREAK
Mode where each line (after the first) is preceded by a <br> tag.


PARAGRAPH

public static final InsertTextMode PARAGRAPH
Mode where each line is wrapped with a <p> element.

Constructor Detail

InsertTextMode

protected InsertTextMode(String name)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

writeLine

public abstract void writeLine(int lineNumber,
                               String line,
                               IMarkupWriter writer,
                               boolean raw)
Invoked by the InsertText component to write the next line.

Parameters:
lineNumber - the line number of the line, starting with 0 for the first line.
line - the String for the current line.
writer - the IMarkupWriter to send output to.
raw - if true, then the output should be unfiltered


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.