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 HtmlContainer

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

public class HtmlContainer
extends HtmlElement

Class for HtmlContainer objects. An HtmlContainer object (itself an HtmlElement) holds any number of HtmlElements. Use the addElement() method to add HtmlElements to an HtmlContainer.

HtmlElements in an HtmlContainer can be accessed by name (the name is set when the HtmlElement is added to the HtmlContainer) or by index position. The arrangement of HtmlElements in the container can be changed by inserting or removing objects. The class also has methods for determining the number of elements in the container, determining if an element existed at a position, replacing an element at a particular index position, etc.

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

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

Constructor Summary
`HtmlContainer()` Constructs an HtmlContainer.

Method Summary
`HtmlContainer` | `addElement(HtmlElement elem)` Adds an HtmlElement to an HtmlContainer.
`HtmlContainer` | `addElement(java.lang.String str)` Adds a string to an HtmlContainer.
`HtmlContainer` | `addElement(java.lang.String newkey, HtmlElement val)` Adds an HtmlElement identified by the specified key to an HtmlContainer.
`HtmlContainer` | `addElement(java.lang.String newkey, java.lang.String str)` Adds a string identified by the specified key to an HtmlContainer.
`void` | `clear()` Clears all elements in an HtmlContainer.
`boolean` | `containsElementAt(int pos)` Determines whether the specified index position exists.
`boolean` | `containsElementAt(java.lang.String keystr)` Determines whether the specified location key exists.
`java.util.Enumeration` | `elements()` Enumerates the elements in an HtmlContainer.
`HtmlElement` | `firstElement()` Returns the first HtmlElement in an HtmlContainer.
`HtmlElement` | `getElementAt(int pos)` Returns the HtmlElement at the specified index position.
`HtmlElement` | `getElementAt(java.lang.String key)` Returns the HtmlElement at the specified key location.
`java.lang.String` | `getKeyAt(int pos)` Gets the keyname at the specified index position.
`boolean` | `hasKeyAt(int pos)` Determines whether the specified index position exists.
`int` | `indexOf(java.lang.String key)` Gets the index position of the specified key identifier.
`HtmlContainer` | `insertElementAt(HtmlElement elem, int pos)` Inserts an HtmlElement into an HtmlContainer at the specified index position.
`HtmlContainer` | `insertElementAt(HtmlElement elem, java.lang.String keyname)` Inserts an HtmlElement into an HtmlContainer at the specified key location.
`HtmlContainer` | `insertElementAt(java.lang.String newkey, HtmlElement val, int pos)` Inserts an HtmlElement identified by the specified key into an HtmlContainer at the specified index position.
`HtmlContainer` | `insertElementAt(java.lang.String newkey, HtmlElement val, java.lang.String keyname)` Inserts an HtmlElement identified by the specified key into an HtmlContainer at the specified key location.
`HtmlContainer` | `insertElementAt(java.lang.String str, int pos)` Inserts a string into an HtmlContainer at the specified index position.
`HtmlContainer` | `insertElementAt(java.lang.String str, java.lang.String keyname)` Inserts a string into an HtmlContainer at the specified key location.
`HtmlContainer` | `insertElementAt(java.lang.String newkey, java.lang.String str, int pos)` Inserts a string identified by the specified key into an HtmlContainer at the specified index position.
`HtmlContainer` | `insertElementAt(java.lang.String newkey, java.lang.String str, java.lang.String keyname)` Inserts a string identified by the specified key into an HtmlContainer at the specified key location.
`HtmlElement` | `lastElement()` Returns the last HtmlElement in an HtmlContainer.
`void` | `output(java.io.OutputStream out)` Outputs an HtmlContainer to the specified output stream.
`void` | `output(java.io.OutputStream out, java.lang.String codeset)` Outputs an HtmlContainer to the specified output stream.
`void` | `output(java.io.PrintWriter pw)`
`HtmlContainer` | `removeElementAt(int pos)` Removes whatever is at the specified index position.
`HtmlContainer` | `removeElementAt(java.lang.String pos)` Removes whatever is at the specified index position.
`HtmlContainer` | `replaceElementAt(HtmlElement elem, int pos)` Replaces whatever is at the specified index position with the specified HtmlElement.
`HtmlContainer` | `replaceElementAt(HtmlElement elem, java.lang.String keystr)` Replaces whatever is at the specified key location with the specified HtmlElement.
`HtmlContainer` | `replaceElementAt(java.lang.String newkey, HtmlElement val, int pos)` Replaces whatever is at the specified index position with the specified HtmlElement identified by the specified key.
`HtmlContainer` | `replaceElementAt(java.lang.String newkey, HtmlElement val, java.lang.String oldkey)` Replaces whatever is at the specified key location with the specified HtmlElement identified by the specified key.
`HtmlContainer` | `replaceElementAt(java.lang.String str, int pos)` Replaces whatever is at the specified index position with the specified string.
`HtmlContainer` | `replaceElementAt(java.lang.String str, java.lang.String keystr)` Replaces whatever is at the specified key location with the specified string.
`HtmlContainer` | `replaceElementAt(java.lang.String newkey, java.lang.String str, int pos)` Replaces whatever is at the specified index position with the specified string identified by the specified key.
`HtmlContainer` | `replaceElementAt(java.lang.String newkey, java.lang.String str, java.lang.String oldkey)` Replaces whatever is at the specified key location with the specified string identified by the specified key.
`int` | `size()` Returns the number of elements in an HtmlContainer.
`int` | `widthAsLiteral()` Constrains width of the contents of an HtmlContainer to its literal width.

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`

Constructor Detail

### HtmlContainer

    public HtmlContainer()

  Constructs an HtmlContainer.

Method Detail

### addElement

    public HtmlContainer addElement(HtmlElement elem)

  Adds an HtmlElement to an HtmlContainer.

  Parameters:
    `elem` - HtmlElement
  Returns:
    HtmlContainer object

### addElement

    public HtmlContainer addElement(java.lang.String str)

  Adds a string to an HtmlContainer.

  Parameters:
    `str` - String
  Returns:
    HtmlContainer object

### addElement

    public HtmlContainer addElement(java.lang.String newkey,
                                    java.lang.String str)

  Adds a string identified by the specified key to an HtmlContainer.

  Parameters:
    `newkey` - Key that identifies the string
    `str` - String
  Returns:
    HtmlContainer object

### addElement

    public HtmlContainer addElement(java.lang.String newkey,
                                    HtmlElement val)

  Adds an HtmlElement identified by the specified key to an HtmlContainer.

  Parameters:
    `newkey` - Key that identifies the HtmlElement
    `val` - HtmlElement
  Returns:
    HtmlContainer object

### insertElementAt

    public HtmlContainer insertElementAt(HtmlElement elem,
                                         int pos)

  Inserts an HtmlElement into an HtmlContainer at the specified index position.

  Parameters:
    `elem` - HtmlElement to be added
    `pos` - Index position
  Returns:
    HtmlContainer object

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String str,
                                         int pos)

  Inserts a string into an HtmlContainer at the specified index position.

  Parameters:
    `str` - String
    `pos` - Index position
  Returns:
    HtmlContainer object

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String newkey,
                                         java.lang.String str,
                                         int pos)

  Inserts a string identified by the specified key into an HtmlContainer at the specified index position.

  Parameters:
    `newkey` - Key that identifies the string
    `str` - String
    `pos` - Index position
  Returns:
    HtmlContainer object

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String newkey,
                                         HtmlElement val,
                                         int pos)

  Inserts an HtmlElement identified by the specified key into an HtmlContainer at the specified index position.

  Parameters:
    `newkey` - Key that identifies the HtmlElement
    `val` - HtmlElement
    `pos` - Index position
  Returns:
    HtmlContainer object

### insertElementAt

    public HtmlContainer insertElementAt(HtmlElement elem,
                                         java.lang.String keyname)
                                  throws HtmlException

  Inserts an HtmlElement into an HtmlContainer at the specified key location.

  Parameters:
    `elem` - HtmlElement
    `keyname` - Location to insert
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if there is an error

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String str,
                                         java.lang.String keyname)
                                  throws HtmlException

  Inserts a string into an HtmlContainer at the specified key location.

  Parameters:
    `str` - String
    `keyname` - Location to insert
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if there is an error

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String newkey,
                                         java.lang.String str,
                                         java.lang.String keyname)
                                  throws HtmlException

  Inserts a string identified by the specified key into an HtmlContainer at the specified key location.

  Parameters:
    `newkey` - Key that identifies the string
    `str` - String
    `keyname` - Location to insert
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if there is an error

### insertElementAt

    public HtmlContainer insertElementAt(java.lang.String newkey,
                                         HtmlElement val,
                                         java.lang.String keyname)
                                  throws HtmlException

  Inserts an HtmlElement identified by the specified key into an HtmlContainer at the specified key location.

  Parameters:
    `newkey` - Key that identifies the HtmlElement
    `val` - HtmlElement
    `keyname` - Location to insert
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if there is an error

### replaceElementAt

    public HtmlContainer replaceElementAt(HtmlElement elem,
                                          int pos)

  Replaces whatever is at the specified index position with the specified HtmlElement.

  Parameters:
    `elem` - HtmlElement
    `pos` - Index position
  Returns:
    HtmlContainer object

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String str,
                                          int pos)

  Replaces whatever is at the specified index position with the specified string.

  Parameters:
    `str` - String
    `pos` - Index position
  Returns:
    HtmlContainer object

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String newkey,
                                          java.lang.String str,
                                          int pos)

  Replaces whatever is at the specified index position with the specified string identified by the specified key.

  Parameters:
    `newkey` - Identifier
    `str` - String
    `pos` - Index position
  Returns:
    HtmlContainer object

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String newkey,
                                          HtmlElement val,
                                          int pos)

  Replaces whatever is at the specified index position with the specified HtmlElement identified by the specified key.

  Parameters:
    `newkey` - Identifier
    `val` - HtmlElement
    `pos` - Index position
  Returns:
    HtmlContainer object

### replaceElementAt

    public HtmlContainer replaceElementAt(HtmlElement elem,
                                          java.lang.String keystr)
                                   throws HtmlException

  Replaces whatever is at the specified key location with the specified HtmlElement.

  Parameters:
    `elem` - HtmlElement
    `keystr` - Location for replacement
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if the key location does not exist

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String str,
                                          java.lang.String keystr)
                                   throws HtmlException

  Replaces whatever is at the specified key location with the specified string.

  Parameters:
    `str` - String
    `keystr` - Location for replacement
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if the key location does not exist

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String newkey,
                                          java.lang.String str,
                                          java.lang.String oldkey)
                                   throws HtmlException

  Replaces whatever is at the specified key location with the specified string identified by the specified key.

  Parameters:
    `newkey` - New key identifier
    `str` - String
    `oldkey` - Location for replacement
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if the key location does not exist

### replaceElementAt

    public HtmlContainer replaceElementAt(java.lang.String newkey,
                                          HtmlElement val,
                                          java.lang.String oldkey)
                                   throws HtmlException

  Replaces whatever is at the specified key location with the specified HtmlElement identified by the specified key.

  Parameters:
    `newkey` - New key identifier
    `val` - HtmlElement
    `oldkey` - Location for replacement
  Returns:
    HtmlContainer object
  Throws:
    HtmlException - if the key location does not exist

### removeElementAt

    public HtmlContainer removeElementAt(int pos)

  Removes whatever is at the specified index position.

  Parameters:
    `pos` - Index position
  Returns:
    HtmlContainer object

### removeElementAt

    public HtmlContainer removeElementAt(java.lang.String pos)

  Removes whatever is at the specified index position.

  Parameters:
    `pos` - Index position
  Returns:
    HtmlContainer object

### containsElementAt

    public boolean containsElementAt(int pos)

  Determines whether the specified index position exists.

  Parameters:
    `pos` - Index position
  Returns:
    True if index position exists

### containsElementAt

    public boolean containsElementAt(java.lang.String keystr)

  Determines whether the specified location key exists.

  Parameters:
    `keystr` - Key identifier
  Returns:
    True if key exists

### size

    public int size()

  Returns the number of elements in an HtmlContainer.

  Returns:
    Number of elements

### getElementAt

    public HtmlElement getElementAt(java.lang.String key)

  Returns the HtmlElement at the specified key location.

  Parameters:
    `key` - Key location
  Returns:
    HtmlElement object

### getElementAt

    public HtmlElement getElementAt(int pos)

  Returns the HtmlElement at the specified index position.

  Parameters:
    `pos` - Index position
  Returns:
    HtmlElement object

### lastElement

    public HtmlElement lastElement()

  Returns the last HtmlElement in an HtmlContainer.

  Returns:
    HtmlElement object

### firstElement

    public HtmlElement firstElement()

  Returns the first HtmlElement in an HtmlContainer.

  Returns:
    HtmlElement object

### getKeyAt

    public java.lang.String getKeyAt(int pos)
                              throws HtmlException

  Gets the keyname at the specified index position.

  Parameters:
    `pos` - Index position
  Returns:
    Location key
  Throws:
    HtmlException - if index position is invalid

### hasKeyAt

    public boolean hasKeyAt(int pos)

  Determines whether the specified index position exists.

  Parameters:
    `pos` - Index position
  Returns:
    True if index position exists

### clear

    public void clear()

  Clears all elements in an HtmlContainer.

### indexOf

    public int indexOf(java.lang.String key)

  Gets the index position of the specified key identifier.

  Parameters:
    `key` - Key identifier
  Returns:
    Index position

### elements

    public final java.util.Enumeration elements()

  Enumerates the elements in an HtmlContainer.

  Returns:
    Enumeration of elements

### widthAsLiteral

    public int widthAsLiteral()

  Constrains width of the contents of an HtmlContainer to its literal width.

  Returns:
    Width of contents
  Overrides:
    widthAsLiteral in class HtmlElement

### output

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

  Outputs an HtmlContainer to the specified output stream.

  Parameters:
    `out` - OutputStream
  Throws:
    java.io.IOException - if there is an IO error
  Overrides:
    output in class HtmlElement

### output

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

  Outputs an HtmlContainer to the specified output stream.

  Parameters:
    `out` - OutputStream
    `codeset` - Java Codeset
  Throws:
    java.io.IOException - if there is an IO error
  Overrides:
    output in class HtmlElement

### output

    public void output(java.io.PrintWriter pw)
                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