All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sics.agentbase.html.HtmlContent

java.lang.Object
   |
   +----sics.agentbase.html.HtmlContent

public class HtmlContent
extends Object
HtmlContent is a class that has a few methods for generating HTML. It can be used as a parent class for other more specialized HTML generator classes.


Variable Index

 o body

Constructor Index

 o HtmlContent()

Method Index

 o add(Object)
Adds a content to the HTML that this object represents.
 o addCentered(Object)
Adds a centered content to the HTML that this object represents.
 o addHeader(int, String)
Adds a header to the HTML code that this object represents.
 o addLink(String, String)
Adds a link to the HTML code that this object represents.
 o clear()
Removes all the HTML content.
 o toString()
Returns a string representing the HTML content.

Variables

 o body
 protected Vector body

Constructors

 o HtmlContent
 public HtmlContent()

Methods

 o addHeader
 public void addHeader(int size,
                       String text)
Adds a header to the HTML code that this object represents. The header will be added last.

Parameters:
size - the size of the header.
text - the header text.
 o addLink
 public void addLink(String url,
                     String text)
Adds a link to the HTML code that this object represents. The link will be added last.

Parameters:
url - the URL (HREF) of the link.
text - the link text.
 o addCentered
 public void addCentered(Object content)
Adds a centered content to the HTML that this object represents. This content will be added last.

Parameters:
content - the content (an object) that is added as centered.
 o add
 public void add(Object content)
Adds a content to the HTML that this object represents. This content will be added last.

Parameters:
content - the content (an object) that is added.
 o clear
 public void clear()
Removes all the HTML content.

 o toString
 public String toString()
Returns a string representing the HTML content. Implemented by invoking toString in all the inserted "content" objects.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index