|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.html.HtmlElement | +--weblogic.html.ElementWithAttributes | +--weblogic.html.SinglePartElement | +--weblogic.html.CenteredElement
A CenteredElement centers an HtmlElement or a string in the center of the current line. It is a block-level element, that is, it introduces a new paragraph in versions of HTML after 2.0. (For older browsers, this may not be the case.)
Use a CenteredElement as the argument for any of the addElement() methods. You can also add centered elements with the asCenteredElement() method in the parent class HtmlElement.
Examples of adding CenteredElements to the body of an htmlKona page called "hp":
hp.addElement(new CenteredElement("Today in the News"));or,
hp.addElement(new StringElement(filename).asCenteredElement());
Prefer setting the ALIGN attribute to center for headings, divisions, and paragraphs. Some browsers do not support this tag.
The HTML CENTER element is deprecated in HTML 4.0 in favor of the DIV element with align set to "center". htmlKona will continue to support CenteredElement, but not all browsers may display this HTML element properly. Prefer DivElement.setCentered().
DivElement.setCentered()
Fields inherited from class weblogic.html.HtmlElement |
codeset,
useObsolete |
Constructor Summary | |
CenteredElement()
Deprecated. Constructs a CenteredElement. |
|
CenteredElement(HtmlElement val)
Deprecated. Constructs a CenteredElement with the specified HtmlElement. |
|
CenteredElement(java.lang.String val)
Deprecated. Constructs a CenteredElement with the specified string. |
Method Summary | |
protected java.lang.String |
getHtmlCode()
Deprecated. |
protected boolean |
printCR()
Deprecated. |
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,
printBody,
printEndingTag,
setBooleanAttribute,
setBooleanAttribute,
setClass,
setDirection,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setId,
setLang,
setLocalVar,
setQuotedAttribute,
setStyle |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CenteredElement()
public CenteredElement(java.lang.String val)
val
- Stringpublic CenteredElement(HtmlElement val)
val
- HtmlElementMethod Detail |
protected java.lang.String getHtmlCode()
protected boolean printCR()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |