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)
-
AQUA
- A color for use in a web page
-
BLACK
-
-
BLUE
-
-
GRAY
-
-
GREEN
-
-
OLIVE
-
-
RED
-
-
TEAL
-
-
WHITE
-
-
WebPage()
-
-
WebPage(String)
- Create a new page with the given title.
-
append(Object)
- Appends the string representation of item to the page.
-
appendLineBreak()
- Appends a line break to the page.
-
clearPageBody()
- Removes all elements from the body of the page.
-
getPageBody()
- Returns in HTML format items append to page.
-
getPageEnding()
- Returns in HTML format tags to end the page
-
getPageHeader()
- Returns in HTML format the header information of the page.
-
setBackgroundColor(String)
- Sets the background color of the page.
-
setBackgroundImage(String)
- Sets the background image of the page.
-
setTextColor(String)
- Sets the color of the text on the page.
-
toString()
- Return the WebPage as html in a string.
AQUA
public static final String AQUA
- A color for use in a web page
BLACK
public static final String BLACK
BLUE
public static final String BLUE
GRAY
public static final String GRAY
GREEN
public static final String GREEN
OLIVE
public static final String OLIVE
RED
public static final String RED
TEAL
public static final String TEAL
WHITE
public static final String WHITE
WebPage
public WebPage()
WebPage
public WebPage(String title)
- Create a new page with the given title.
append
public void append(Object item)
- Appends the string representation of item to the page.
appendLineBreak
public void appendLineBreak()
- Appends a line break to the page.
clearPageBody
public void clearPageBody()
- Removes all elements from the body of the page.
setBackgroundImage
public void setBackgroundImage(String anImageURL)
- Sets the background image of the page.
- Parameters:
- anImageURL - a URL to an image suitable for a
background
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
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
getPageHeader
public String getPageHeader()
- Returns in HTML format the header information of the page.
Uses information set by setBackgroundColor and
setBackgroundImage
getPageBody
public String getPageBody()
- Returns in HTML format items append to page.
getPageEnding
public String getPageEnding()
- Returns in HTML format tags to end the page
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