All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.html.WebPage

java.lang.Object
   |
   +----sdsu.html.WebPage

public class WebPage
extends Object
An HTML document has a minimal required structure ( HEAD, BODY, etc). This class generates the basic structure for a HTML document. Append HTML objects and/or HTML tags a Webpage object, then use the toString() method to get the HTML document in ascii format.

Version:
0.8 6 April 1997
Author:
Roger Whitney (whitney@cs.sdsu.edu)

Variable Index

 o AQUA
A color for use in a web page
 o BLACK
 o BLUE
 o GRAY
 o GREEN
 o OLIVE
 o RED
 o TEAL
 o WHITE

Constructor Index

 o WebPage()
 o WebPage(String)
Create a new page with the given title.

Method Index

 o append(Object)
Appends the string representation of item to the page.
 o appendLineBreak()
Appends a line break to the page.
 o clearPageBody()
Removes all elements from the body of the page.
 o getPageBody()
Returns in HTML format items append to page.
 o getPageEnding()
Returns in HTML format tags to end the page
 o getPageHeader()
Returns in HTML format the header information of the page.
 o setBackgroundColor(String)
Sets the background color of the page.
 o setBackgroundImage(String)
Sets the background image of the page.
 o setTextColor(String)
Sets the color of the text on the page.
 o toString()
Return the WebPage as html in a string.

Variables

 o AQUA
 public static final String AQUA
A color for use in a web page

 o BLACK
 public static final String BLACK
 o BLUE
 public static final String BLUE
 o GRAY
 public static final String GRAY
 o GREEN
 public static final String GREEN
 o OLIVE
 public static final String OLIVE
 o RED
 public static final String RED
 o TEAL
 public static final String TEAL
 o WHITE
 public static final String WHITE

Constructors

 o WebPage
 public WebPage()
 o WebPage
 public WebPage(String title)
Create a new page with the given title.

Methods

 o append
 public void append(Object item)
Appends the string representation of item to the page.

 o appendLineBreak
 public void appendLineBreak()
Appends a line break to the page.

 o clearPageBody
 public void clearPageBody()
Removes all elements from the body of the page.

 o setBackgroundImage
 public void setBackgroundImage(String anImageURL)
Sets the background image of the page.

Parameters:
anImageURL - a URL to an image suitable for a background
 o setBackgroundColor
 public void setBackgroundColor(String aColor)
Sets the background color of the page. Use either the predefined colors in static variables of the class or the format: #XXYYZZ where XX = hex value of red, YY = hex value of green, ZZ = hex value of blue So WHITE = #FFFFFF and BLACK = #000000

 o setTextColor
 public void setTextColor(String aColor)
Sets the color of the text on the page. Use either the predefined colors in static variables of the class or the format: #XXYYZZ where XX = hex value of red, YY = hex value of green, ZZ = hex value of blue So WHITE = #FFFFFF and BLACK = #000000

 o getPageHeader
 public String getPageHeader()
Returns in HTML format the header information of the page. Uses information set by setBackgroundColor and setBackgroundImage

 o getPageBody
 public String getPageBody()
Returns in HTML format items append to page.

 o getPageEnding
 public String getPageEnding()
Returns in HTML format tags to end the page

 o toString
 public String toString()
Return the WebPage as html in a string.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index