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 Server 5.1.0sp9 API Reference

## weblogic.html
Class ElementWithAttributes

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

Direct Known Subclasses:
  MultiPartElement, SinglePartElement

public abstract class ElementWithAttributes
extends HtmlElement

The ElementWithAttributes is the parent class from which all HtmlElements with attributes are derived. The classes MultiPartElement and SinglePartElement are both derived from this class.

This class provides support for its subclasses for style sheets, which conforms to HTML 4.0.

Author:
  Copyright (c) 1995-1997, WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999, BEA Systems, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `MultiPartElement`, `SinglePartElement`

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

Constructor Summary
`ElementWithAttributes()`

Method Summary
`void` | `addAttribute(java.lang.String name, java.lang.String value)` Sets the attribute name with value.
`void` | `addAttribute(java.lang.String name, java.lang.String value, boolean upperCaseName)` Sets the attribute name with value.
`protected java.lang.String` | `escapeQuotes(java.lang.String inOrig)`
`protected boolean` | `getBooleanAttribute(java.lang.String key)`
`protected HtmlElement` | `getElementAttribute(java.lang.String key)`
`protected abstract java.lang.String` | `getHtmlCode()`
`protected java.lang.Object` | `getLocalVar(java.lang.String attrib)`
`protected java.lang.String` | `getQuotedAttribute(java.lang.String key)`
`void` | `output(java.io.OutputStream out)`
`void` | `output(java.io.OutputStream out, java.lang.String codeset)`
`void` | `output(java.io.PrintWriter ostr)`
`protected boolean` | `printBody()`
`protected abstract void` | `printBody(java.io.OutputStream out)`
`protected abstract void` | `printBody(java.io.OutputStream out, java.lang.String codeset)`
`protected abstract void` | `printBody(java.io.PrintWriter pw)`
`protected boolean` | `printCR()`
`protected boolean` | `printEndingTag()`
`protected void` | `setBooleanAttribute(java.lang.String key)`
`protected void` | `setBooleanAttribute(java.lang.String key, boolean val)`
`ElementWithAttributes` | `setClass(java.lang.String classattr)` Sets the CLASS attribute for style sheet.
`ElementWithAttributes` | `setDirection(java.lang.String dir)` Sets the text direction for an ElementWithAttributes.
`protected void` | `setElementAttribute(java.lang.String key, boolean val)`
`protected void` | `setElementAttribute(java.lang.String key, float val)`
`protected void` | `setElementAttribute(java.lang.String key, HtmlElement val)`
`protected void` | `setElementAttribute(java.lang.String key, int val)`
`protected void` | `setElementAttribute(java.lang.String key, java.lang.String val)`
`ElementWithAttributes` | `setId(java.lang.String id)` Sets the ID attribute for an ElementWithAttributes.
`ElementWithAttributes` | `setLang(java.lang.String lang)` Sets the language for an ElementWithAttributes (codes from ISO 639 and ISO 3166).
`protected void` | `setLocalVar(java.lang.String attrib, java.lang.Object val)`
`protected void` | `setQuotedAttribute(java.lang.String key, java.lang.String val)`
`ElementWithAttributes` | `setStyle(java.lang.String style)` Sets the STYLE attribute for an ElementWithAttributes, which specifies style information for the element using the default style sheet language.

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, widthAsLiteral`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ElementWithAttributes

    public ElementWithAttributes()

Method Detail

### getHtmlCode

    protected abstract java.lang.String getHtmlCode()

### printCR

    protected boolean printCR()

### printBody

    protected boolean printBody()

### printEndingTag

    protected boolean printEndingTag()

### setClass

    public ElementWithAttributes setClass(java.lang.String classattr)

  Sets the CLASS attribute for style sheet. The class or ID matches a style defined in a StyleElement, which is part of the Head of the document.

  Parameters:
    `classattr` - Name of the style
  Returns:
    ElementWithAttributes

### setId

    public ElementWithAttributes setId(java.lang.String id)

  Sets the ID attribute for an ElementWithAttributes. The class or ID matches a style defined in a StyleElement, which is part of the Head of the document. ID can be set for many elements at the page, block, and character levels.

  Parameters:
    `class` - Name of the style
  Returns:
    ElementWithAttributes

### setLang

    public ElementWithAttributes setLang(java.lang.String lang)

  Sets the language for an ElementWithAttributes (codes from ISO 639 and ISO 3166). Language can be set for many elements at the page, block, and character levels.

  Parameters:
    `lang` - LANG attribute
  Returns:
    ElementWithAttributes

### setDirection

    public ElementWithAttributes setDirection(java.lang.String dir)

  Sets the text direction for an ElementWithAttributes. Valid values for text direction are: RTL, LTR. Direction can be set for many elements at the page, block, and character levels.

  Parameters:
    `dir` - Direction text should be displayed
  Returns:
    ElementWithAttributes

### setStyle

    public ElementWithAttributes setStyle(java.lang.String style)

  Sets the STYLE attribute for an ElementWithAttributes, which specifies style information for the element using the default style sheet language. The style attribute is only appropriate when you want to apply a particular style to an individual HTML element. If the style will be reused for several elements, create a StyleElement and identify it by calling the `setId()` method in this class.

  A typical argument for this method might be "font-size: 12pt; color: fuschia".

  Parameters:
    `style` - String that defines formatting
  Returns:
    ElementWithAttributes

### setLocalVar

    protected void setLocalVar(java.lang.String attrib,
                               java.lang.Object val)

### getLocalVar

    protected java.lang.Object getLocalVar(java.lang.String attrib)

### getElementAttribute

    protected HtmlElement getElementAttribute(java.lang.String key)

### setElementAttribute

    protected void setElementAttribute(java.lang.String key,
                                       HtmlElement val)

### setElementAttribute

    protected void setElementAttribute(java.lang.String key,
                                       java.lang.String val)

### setElementAttribute

    protected void setElementAttribute(java.lang.String key,
                                       int val)

### setElementAttribute

    protected void setElementAttribute(java.lang.String key,
                                       float val)

### setElementAttribute

    protected void setElementAttribute(java.lang.String key,
                                       boolean val)

### getBooleanAttribute

    protected boolean getBooleanAttribute(java.lang.String key)

### setBooleanAttribute

    protected void setBooleanAttribute(java.lang.String key)

### setBooleanAttribute

    protected void setBooleanAttribute(java.lang.String key,
                                       boolean val)

### getQuotedAttribute

    protected java.lang.String getQuotedAttribute(java.lang.String key)

### setQuotedAttribute

    protected void setQuotedAttribute(java.lang.String key,
                                      java.lang.String val)

### escapeQuotes

    protected java.lang.String escapeQuotes(java.lang.String inOrig)

### printBody

    protected abstract void printBody(java.io.OutputStream out)
                               throws java.io.IOException

### printBody

    protected abstract void printBody(java.io.OutputStream out,
                                      java.lang.String codeset)
                               throws java.io.IOException

### printBody

    protected abstract void printBody(java.io.PrintWriter pw)
                               throws java.io.IOException

### output

    public void output(java.io.OutputStream out)
                throws java.io.IOException

  Overrides:
    output in class HtmlElement

### output

    public void output(java.io.OutputStream out,
                       java.lang.String codeset)
                throws java.io.IOException

  Overrides:
    output in class HtmlElement

### addAttribute

    public void addAttribute(java.lang.String name,
                             java.lang.String value)

  Sets the attribute name with value. To be compliant with the HTML 4.0 specification, the attribute name is converted to all capital letters.

  This method is intended for setting attribute values that do not have specific setters.

  Parameters:
    `name` - String attribute name
    `value` - String attribute value

### addAttribute

    public void addAttribute(java.lang.String name,
                             java.lang.String value,
                             boolean upperCaseName)

  Sets the attribute name with value. To be compliant with the HTML 4.0 specification, the attribute names should be given in all capital letters. If upperCaseName is true, the attribute name will be converted to all capital letters. If upperCaseName is false, the attribute name will be used as given.

  This method is intended for setting attribute values that do not have specific setters.

  Parameters:
    `name` - String attribute name
    `value` - String attribute value
    `upperCaseName` - True if attribute name is to be converted to all upper case

### output

    public void output(java.io.PrintWriter ostr)
                throws java.io.IOException

  Overrides:
    output in class HtmlElement

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD