|
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.TableDataElement
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.
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected StringElement contents
protected HtmlElement val
Constructor Detail |
public TableDataElement()
public TableDataElement(HtmlElement elem)
elem
- HtmlElementpublic TableDataElement(java.lang.String data)
data
- StringMethod Detail |
protected java.lang.String getHtmlCode()
protected boolean printCR()
public StringElement getContents()
public HtmlElement getHtmlElement()
public TableDataElement setWidth(java.lang.String width)
width
- Width as an intpublic TableDataElement setHeight(int height)
height
- Height as an intpublic TableDataElement setAlign(AlignType val)
val
- AlignType objectpublic TableDataElement setVAlign(AlignType val)
val
- Vertical alignment as an AlignType objectpublic TableDataElement setNoWrap(boolean val)
val
- True if the text should not wrappublic TableDataElement setColSpan(int val)
val
- Number of columns as an intpublic TableDataElement setRowSpan(int val)
val
- Number of rows as an intpublic TableDataElement setBgColor(java.lang.String color)
color
- Constant from FontElement or RGB (hex) colorFontElement
public TableDataElement setBgColor(java.awt.Color color)
color
- Color objectpublic TableDataElement setBackground(java.lang.String url)
img
- URL for image
|
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 |