BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.html
Class TableCaptionElement

java.lang.Object
  |
  +--weblogic.html.HtmlElement
        |
        +--weblogic.html.ElementWithAttributes
              |
              +--weblogic.html.SinglePartElement
                    |
                    +--weblogic.html.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()
          .setBorder(1)
          .setCellPadding(5)
          .setWidth(50%)
          .setCaption(new StrongElement("Fall Registration Schedule")
                                        .asAnchorElement("sched"));
 

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

Field Summary
static AlignType default_align
          Default alignment for a TableCaptionElement is unset.
 
Fields inherited from class weblogic.html.HtmlElement
codeset, useObsolete
 
Constructor Summary
TableCaptionElement()
          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

default_align

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 AlignType.top. You can use this variable to set it to "bottom," or use the setAlign() method.
Constructor Detail

TableCaptionElement

public TableCaptionElement()
Constructs a TableCaptionElement.

TableCaptionElement

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

Parameters:
elem - HtmlElement object

TableCaptionElement

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

Parameters:
caption - String object
Method Detail

getHtmlCode

protected java.lang.String getHtmlCode()

Overrides:
getHtmlCode in class ElementWithAttributes

printCR

protected boolean printCR()

Overrides:
printCR in class ElementWithAttributes

setAlign

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.

Parameters:
val - AlignType object
Returns:
TableCaptionElement object

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