Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.html
Class TableDataElement

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

Direct Known Subclasses:
  TableHeadingElement

public class TableDataElement
extends SinglePartElement

A TableDataElement object is used to display a single cell of an htmlKona TableElement. A TableRowElement can be built by adding TableDataElements to it. For example, this shows how to created a nested table by adding TableDataElements to TableRowElements:

      TableElement tab = new TableElement()
              .setBorder(1)
              .setCellPadding(5)
              .setWidth(50%)
              .setCaption(new StrongElement("Fall Registration Schedule").asItalicElement());
       tab.addElement(new TableRowElement()
                      .addElement(new TableHeadingElement(new AnchorElement(AnchorType.name,
                                                                     "topic",
                                                                     "Topic")))
                      .addElement(new TableHeadingElement("Value").setBgColor(HtmlColor.navy)));
       tab.addElement(new TableRowElement()
                      .addElement(new TableDataElement(reg.getID()).setVAlign(AlignType.top))
                      .addElement(new TableDataElement(new TableElement(reg.getMain())
                                                       .setCaption(new BoldElement("N1"))
                                                       .setBorder(1))
                                  .setVAlign(AlignType.top)));
       page.getBody().addElement(new CenteredElement(tab));

and so forth.

This class also supports browser extensions for setting BGCOLOR and BACKGROUND (image) attributes, and other attributes for alignment. Attributes such as id, class, lang, and dir are available with methods from a superclass.

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

Field Summary
`protected StringElement` | `contents` Deprecated.
`protected HtmlElement` | `val` Deprecated.

Fields inherited from class weblogic.html.HtmlElement
`codeset, useObsolete`

Constructor Summary
`TableDataElement()` Deprecated. Constructs a TableDataElement object.
`TableDataElement(HtmlElement elem)` Deprecated. Constructs a TableDataElement object with the specified HtmlElement object.
`TableDataElement(java.lang.String data)` Deprecated. Constructs a TableDataElement object with the specified String.

Method Summary
`StringElement` | `getContents()` Deprecated. Gets the contents of a TableDataElement as a StringElement.
`protected java.lang.String` | `getHtmlCode()` Deprecated.
`HtmlElement` | `getHtmlElement()` Deprecated. Gets the underlying HtmlElement used to create the contents of the TableDataElement.
`protected boolean` | `printCR()` Deprecated.
`TableDataElement` | `setAlign(AlignType val)` Deprecated. Sets the alignment of a TableDataElement.
`TableDataElement` | `setBackground(java.lang.String url)` Deprecated. Sets a background image for a table data cell.
`TableDataElement` | `setBgColor(java.awt.Color color)` Deprecated. Sets the background color to the specified java.awt.Color object.
`TableDataElement` | `setBgColor(java.lang.String color)` Deprecated. Sets the background color for a table data cell.
`TableDataElement` | `setColSpan(int val)` Deprecated. Sets the number of columns spanned by a TableDataElement.
`TableDataElement` | `setHeight(int height)` Deprecated. Sets the height of a TableDataElement in pixels.
`TableDataElement` | `setNoWrap(boolean val)` Deprecated. Determines whether the text in the TableDataElement wraps.
`TableDataElement` | `setRowSpan(int val)` Deprecated. Sets the number of rows spanned by a TableDataElement.
`TableDataElement` | `setVAlign(AlignType val)` Deprecated. Sets the vertical alignment of a TableDataElement.
`TableDataElement` | `setWidth(java.lang.String width)` Deprecated. Sets the width of a TableDataElement in pixels or a percent of the width of the browser.

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

### contents

    protected StringElement contents

  Deprecated.

### val

    protected HtmlElement val

  Deprecated.

Constructor Detail

### TableDataElement

    public TableDataElement()

  Deprecated.
  Constructs a TableDataElement object.

### TableDataElement

    public TableDataElement(HtmlElement elem)

  Deprecated.
  Constructs a TableDataElement object with the specified HtmlElement object.

  Parameters:
    `elem` - HtmlElement

### TableDataElement

    public TableDataElement(java.lang.String data)

  Deprecated.
  Constructs a TableDataElement object with the specified String.

  Parameters:
    `data` - String

Method Detail

### getHtmlCode

    protected java.lang.String getHtmlCode()

  Deprecated.

  Overrides:
    getHtmlCode in class ElementWithAttributes

### printCR

    protected boolean printCR()

  Deprecated.

  Overrides:
    printCR in class ElementWithAttributes

### getContents

    public StringElement getContents()

  Deprecated.
  Gets the contents of a TableDataElement as a StringElement.

  Returns:
    StringElement

### getHtmlElement

    public HtmlElement getHtmlElement()

  Deprecated.
  Gets the underlying HtmlElement used to create the contents of the TableDataElement. Use this method to get at the contents of a FormElement that have been added to a TableElement.

  Returns:
    HtmlElement

### setWidth

    public TableDataElement setWidth(java.lang.String width)

  Deprecated.
  Sets the width of a TableDataElement in pixels or a percent of the width of the browser.

  Parameters:
    `width` - Width as an int
  Returns:
    TableDataElement object

### setHeight

    public TableDataElement setHeight(int height)

  Deprecated.
  Sets the height of a TableDataElement in pixels.

  Parameters:
    `height` - Height as an int
  Returns:
    TableDataElement

### setAlign

    public TableDataElement setAlign(AlignType val)

  Deprecated.
  Sets the alignment of a TableDataElement. Valid types are left, right, center.

  Parameters:
    `val` - AlignType object
  Returns:
    TableDataElement object

### setVAlign

    public TableDataElement setVAlign(AlignType val)

  Deprecated.
  Sets the vertical alignment of a TableDataElement. Valid types are top, middle, bottom, baseline.

  Parameters:
    `val` - Vertical alignment as an AlignType object
  Returns:
    TableDataElement object

### setNoWrap

    public TableDataElement setNoWrap(boolean val)

  Deprecated.
  Determines whether the text in the TableDataElement wraps. If you set the NOWRAP attribute, you must use a BreakElement to specify line breaks, or the entire cell will show up as a single line.

  Parameters:
    `val` - True if the text should not wrap
  Returns:
    TableDataElement object

### setColSpan

    public TableDataElement setColSpan(int val)

  Deprecated.
  Sets the number of columns spanned by a TableDataElement.

  Parameters:
    `val` - Number of columns as an int
  Returns:
    TableDataElement object

### setRowSpan

    public TableDataElement setRowSpan(int val)

  Deprecated.
  Sets the number of rows spanned by a TableDataElement.

  Parameters:
    `val` - Number of rows as an int
  Returns:
    TableDataElement object

### setBgColor

    public TableDataElement setBgColor(java.lang.String color)

  Deprecated.
  Sets the background color for a table data cell. Use the constants in FontElement for color names or use the hex value of an RGB color.

  Parameters:
    `color` - Constant from FontElement or RGB (hex) color
  See Also:
    `FontElement`

### setBgColor

    public TableDataElement setBgColor(java.awt.Color color)

  Deprecated.
  Sets the background color to the specified java.awt.Color object.

  Parameters:
    `color` - Color object
  Returns:
    TableDataElement

### setBackground

    public TableDataElement setBackground(java.lang.String url)

  Deprecated.
  Sets a background image for a table data cell.

  Parameters:
    `img` - URL for image

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference