BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

Class TableCaptionElement


public class TableCaptionElement
extends SinglePartElement

A TableCaptionElement object is used to set the caption and its attributes for an htmlKona TableElement. Set alignment with an AlignType object. Use the TableElement.addElement() or the TableElement.setCaption() methods to add a TableCaptionElement to a TableElement. Here is an example:

  TableElement tab = new TableElement()
          .setCaption(new StrongElement("Fall Registration Schedule")

Copyright (c) 1995-97 by WebLogic, Inc. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.
See Also:

Field Summary
static AlignType default_align
          Default alignment for a TableCaptionElement is unset.
Fields inherited from class weblogic.html.HtmlElement
codeset, useObsolete
Constructor Summary
          Constructs a TableCaptionElement.
TableCaptionElement(HtmlElement elem)
          Constructs a TableCaptionElement with the specified HtmlElement.
TableCaptionElement(java.lang.String caption)
          Constructs a TableCaptionElement with the specified String and sets the default alignment.
Method Summary
protected  java.lang.String getHtmlCode()
protected  boolean printCR()
 TableCaptionElement setAlign(AlignType val)
          Sets the alignment for a TableCaptionElement to the specified AlignType.
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 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


public static AlignType default_align
Default alignment for a TableCaptionElement is unset. The HTML default (that is, if there is no explicit ALIGN attribute) for alignment is You can use this variable to set it to "bottom," or use the setAlign() method.
Constructor Detail


public TableCaptionElement()
Constructs a TableCaptionElement.


public TableCaptionElement(HtmlElement elem)
Constructs a TableCaptionElement with the specified HtmlElement.

elem - HtmlElement object


public TableCaptionElement(java.lang.String caption)
Constructs a TableCaptionElement with the specified String and sets the default alignment.

caption - String object
Method Detail


protected java.lang.String getHtmlCode()

getHtmlCode in class ElementWithAttributes


protected boolean printCR()

printCR in class ElementWithAttributes


public TableCaptionElement setAlign(AlignType val)
Sets the alignment for a TableCaptionElement to the specified AlignType. Valid values for the ALIGN attribute of a caption are top, bottom. HTML defaults to a top alignment; that is, if there is no ALIGN attribute, the caption will appear centered at the top of the table.

val - AlignType object
TableCaptionElement object

Documentation is available at