BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.html
Class BodyElement

java.lang.Object
  |
  +--weblogic.html.HtmlElement
        |
        +--weblogic.html.ElementWithAttributes
              |
              +--weblogic.html.SinglePartElement
                    |
                    +--weblogic.html.BodyElement

public class BodyElement
extends SinglePartElement

The BodyElement class is used to set attributes for the body of an HtmlPage. Colors used as arguments for methods in this class can be the valid color names encapsulated in HtmlColor, or a java.awt.Color object, or a six-letter string that denotes the hex value of an RGB color preceded by the "#" symbol.

There is no public constructor for this class. Call the setAttribute() method in this class (after constructing an HtmlPage and calling the HtmlPage.getBodyElement() method) to set attributes. Add other HtmlElements to the body portion of an HtmlPage after calling HtmlPage.getBody() method with addElement().

Author:
Copyright (c) 1996-97 by WebLogic, Inc. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.
See Also:
HtmlPage.getBodyElement(), HtmlPage.getBody(), HtmlColor

Field Summary
static java.lang.String aLinkColor
          Constant for ALINK tag in BODY element.
static java.lang.String backgroundImg
          Constant for BACKGROUND tag in BODY element.
static java.lang.String bgColor
          Constant for BGCOLOR tag in BODY element.
static java.lang.String linkColor
          Constant for LINK tag in BODY element.
static java.lang.String onLoadScript
          Constant for onLoad tag in BODY element for use with a ScriptElement.
static java.lang.String onUnloadScript
          Constant for onUnload tag in BODY element for use with a ScriptElement.
static java.lang.String textColor
          Constant for TEXT tag in BODY element.
static java.lang.String vLinkColor
          Constant for VLINK tag in BODY element.
 
Fields inherited from class weblogic.html.HtmlElement
codeset, useObsolete
 
Method Summary
 HtmlContainer addElement(HtmlElement he)
          Adds an element to the HtmlContainer of a BodyElement.
 HtmlContainer getContainer()
          Returns the HtmlContainer that is bounded by the start and end tags of a BodyElement.
protected  java.lang.String getHtmlCode()
           
protected  boolean printBody()
           
protected  boolean printCR()
           
protected  boolean printEndingTag()
           
 BodyElement setAttribute(java.lang.String attrib, java.awt.Color color)
          Sets an attribute and its value as a java.awt.Color object, for those attributes that set colors.
 BodyElement setAttribute(java.lang.String attrib, java.lang.String value)
          Sets an attribute and its value of a BodyElement.
 
Methods inherited from class weblogic.html.SinglePartElement
getElement, printBody, printBody, printBody, setElement, setElement, widthAsLiteral
 
Methods inherited from class weblogic.html.ElementWithAttributes
addAttribute, addAttribute, escapeQuotes, getBooleanAttribute, getElementAttribute, getLocalVar, getQuotedAttribute, output, output, output, setBooleanAttribute, setBooleanAttribute, setClass, setDirection, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setId, setLang, setLocalVar, setQuotedAttribute, setStyle
 
Methods inherited from class weblogic.html.HtmlElement
asAnchorElement, asBigElement, asBlockquoteElement, asBoldElement, asCenteredElement, asCiteElement, asCodeElement, asCommentElement, asDefineTermElement, asEmphasisElement, asFontElement, asFontElement, asFontElement, asHtmlContainer, asItalicElement, asKeyboardElement, asLiteralElement, asParagraphElement, asSampleElement, asSmallElement, asStrikeElement, asStrongElement, asSubscriptElement, asSuperscriptElement, asTeletypeElement, asUnderlineElement, asVariableElement, getVersion, setAnchorMode, setCodeset, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

backgroundImg

public static java.lang.String backgroundImg
Constant for BACKGROUND tag in BODY element.

bgColor

public static java.lang.String bgColor
Constant for BGCOLOR tag in BODY element.

textColor

public static java.lang.String textColor
Constant for TEXT tag in BODY element. Use an HtmlColor constant or a (hex) RGB value preceded by "#". or

linkColor

public static java.lang.String linkColor
Constant for LINK tag in BODY element.

aLinkColor

public static java.lang.String aLinkColor
Constant for ALINK tag in BODY element.

vLinkColor

public static java.lang.String vLinkColor
Constant for VLINK tag in BODY element.

onLoadScript

public static java.lang.String onLoadScript
Constant for onLoad tag in BODY element for use with a ScriptElement.

onUnloadScript

public static java.lang.String onUnloadScript
Constant for onUnload tag in BODY element for use with a ScriptElement.
Method Detail

getContainer

public HtmlContainer getContainer()
Returns the HtmlContainer that is bounded by the start and end tags of a BodyElement.

Returns:
HtmlContainer

setAttribute

public BodyElement setAttribute(java.lang.String attrib,
                                java.lang.String value)
Sets an attribute and its value of a BodyElement. Constants are provided in this class for valid body attributes in the current HTML specification.

Parameters:
attrib - Constant in this class or a valid HTML attribute for the BODY element
value - Value of the attribute
Returns:
BodyElement

setAttribute

public BodyElement setAttribute(java.lang.String attrib,
                                java.awt.Color color)
Sets an attribute and its value as a java.awt.Color object, for those attributes that set colors. Constants are provided in this class for valid body attributes in the current HTML specification.

Parameters:
attrib - Constant in this class or a valid HTML attribute for the BODY element
color - Color object
Returns:
BodyElement

addElement

public HtmlContainer addElement(HtmlElement he)
Adds an element to the HtmlContainer of a BodyElement.

Returns:
HtmlContainer

getHtmlCode

protected java.lang.String getHtmlCode()

Overrides:
getHtmlCode in class ElementWithAttributes

printCR

protected boolean printCR()

Overrides:
printCR in class ElementWithAttributes

printBody

protected boolean printBody()

Overrides:
printBody in class ElementWithAttributes

printEndingTag

protected boolean printEndingTag()

Overrides:
printEndingTag in class ElementWithAttributes

Documentation is available at
http://www.weblogic.com/docs51