org.apache.tapestry.parse
Class TextToken

java.lang.Object
  extended by org.apache.tapestry.parse.TemplateToken
      extended by org.apache.tapestry.parse.TextToken
All Implemented Interfaces:
ILocatable, IRender

public class TextToken
extends TemplateToken
implements IRender

Represents static text in the template that may be passed through to the client unchanged (except, perhaps, for the removal of some whitespace).

Since:
3.0
Version:
$Id: TextToken.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship
See Also:
TokenType.TEXT

Constructor Summary
TextToken(char[] templateData, int startIndex, int endIndex, ILocation location)
           
 
Method Summary
protected  void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
          Overridden in subclasses to append additional fields (defined in the subclass) to the description.
 int getEndIndex()
           
 int getStartIndex()
           
 char[] getTemplateData()
           
 void render(IMarkupWriter writer, IRequestCycle cycle)
          The principal rendering/rewinding method.
 
Methods inherited from class org.apache.tapestry.parse.TemplateToken
getLocation, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextToken

public TextToken(char[] templateData,
                 int startIndex,
                 int endIndex,
                 ILocation location)
Method Detail

render

public void render(IMarkupWriter writer,
                   IRequestCycle cycle)
Description copied from interface: IRender
The principal rendering/rewinding method. This will cause the receiving component to render its top level elements (HTML text and components).

Renderring and rewinding are the exact same process. The same code that renders must be able to restore state by going through the exact same operations (even though the output is discarded).

Specified by:
render in interface IRender

extendDescription

protected void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
Description copied from class: TemplateToken
Overridden in subclasses to append additional fields (defined in the subclass) to the description. Subclasses may override this method without invoking this implementation, which is empty.

Overrides:
extendDescription in class TemplateToken

getEndIndex

public int getEndIndex()

getStartIndex

public int getStartIndex()

getTemplateData

public char[] getTemplateData()