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
-
HtmlText()
-
-
HtmlText(String)
-
-
HtmlText(String, String)
-
-
add(String)
- appends a space and then this text to the text of this element.
-
add(String, String)
- appends a space and then this text wrapped in tags specified in the tags
to this text of this element.
-
addTag(String)
-
-
addTag(String, String)
-
-
print(OutputStream, String)
-
-
toString()
-
-
wrap(String)
-
-
write(OutputStream)
-
HtmlText
public HtmlText()
HtmlText
public HtmlText(String text)
- Parameters:
- text - String to insert into the html
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.
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.
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.
addTag
public void addTag(String tag)
- Parameters:
- tag - the tag to append to this text
addTag("P") is equivalent to add("
");
addTag
public void addTag(String tag,
String attribs)
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
write
public void write(OutputStream out) throws IOException
- Parameters:
- out - Output stream to write html to
toString
public String toString()
- Overrides:
- toString in class Object
print
public static void print(OutputStream out,
String s)
All Packages Class Hierarchy This Package Previous Next Index