Class java.servlet.html.HtmlText
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.servlet.html.HtmlText

java.lang.Object
   |
   +----java.servlet.html.HtmlText

public class HtmlText
extends Object
implements HtmlElement
text element for regular text you want to insert in the html

Constructor Index

 o HtmlText()
 o HtmlText(String)
 o HtmlText(String, String)

Method Index

 o add(String)
appends a space and then this text to the text of this element.
 o add(String, String)
appends a space and then this text wrapped in tags specified in the tags to this text of this element.
 o addTag(String)
 o addTag(String, String)
 o print(OutputStream, String)
 o toString()
 o wrap(String)
 o write(OutputStream)

Constructors

 o HtmlText
  public HtmlText()
 o HtmlText
  public HtmlText(String text)
Parameters:
text - String to insert into the html
 o HtmlText
  public HtmlText(String text,
                  String tags)
Parameters:
text - String to insert into the html
tags - String of comma delimmitted tags to wrap around this whole HtmlText object.

Methods

 o add
  public void add(String ntext)
appends a space and then this text to the text of this element.
Parameters:
text - String to append to this text.
 o add
  public void add(String text,
                  String tags)
appends a space and then this text wrapped in tags specified in the tags to this text of this element.
Parameters:
text - text to add to this element
tags - comma delimmitted list of tags to wrap around the new text.
 o addTag
  public void addTag(String tag)
Parameters:
tag - the tag to append to this text addTag("P") is equivalent to add("

");

 o addTag
  public void addTag(String tag,
                     String attribs)
 o wrap
  public void wrap(String tags)
Parameters:
tags - String of comma delimmitted tags to wrap around this text. ie.
text.wrap("b, a href=foo.html");
generates:
the text for this Element
 o write
  public void write(OutputStream out) throws IOException
Parameters:
out - Output stream to write html to
 o toString
  public String toString()
Overrides:
toString in class Object
 o print
  public static void print(OutputStream out,
                           String s)

All Packages  Class Hierarchy  This Package  Previous  Next  Index