Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.html
Class Block

    java.lang.Object
      org.mortbay.html.Element
          org.mortbay.html.Composite
              org.mortbay.html.Block

Direct Known Subclasses:
  Applet, Font, Form, Heading, Link, List, Script, Select, Style, Table, Target, TextArea

    public class Block

extends Composite

HTML Block Composite. Block of predefined or arbitrary type. Block types are predefined for PRE, BLOCKQUOTE, CENTER, LISTING, PLAINTEXT, XMP, DIV (Left and Right) and SPAN.

See Also:
  `Composite`

Field Summary
`static java.lang.String` | `Bold` Bold
`static java.lang.String` | `Center` Center the block
`static java.lang.String` | `Div` Basic Division
`static java.lang.String` | `Italic` Italic
`static java.lang.String` | `Left` Left align
`static java.lang.String` | `Listing` Code listing style
`static java.lang.String` | `Plain` Plain text
`static java.lang.String` | `Pre` Preformatted text
`static java.lang.String` | `Quote` Quoted Text
`static java.lang.String` | `Right` Right align
`static java.lang.String` | `Span` Span
`static java.lang.String` | `Xmp` Old pre format - preserve line breaks

Fields inherited from class org.mortbay.html.Composite
`elements, nest`

Fields inherited from class org.mortbay.html.Element
`ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH`

Constructor Summary
`Block(java.lang.String tag)` Construct a block using the passed string as the tag.
`Block(java.lang.String tag, java.lang.String attributes)` Construct a block using the passed string as the tag.

Method Summary
`void` | `write(java.io.Writer out)` Write the composite.

Methods inherited from class org.mortbay.html.Composite
`add, contents, nest, replace, reset, setNest, size, unnest`

Methods inherited from class org.mortbay.html.Element
`attribute, attribute, attribute, attributes, attributes, bgColor, bottom, center, color, cssClass, cssID, height, height, height, left, middle, right, setAttributesFrom, size, size, style, top, toString, width, width, width, write, write`

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

Field Detail

### Pre

    public static final java.lang.String Pre

  Preformatted text

  See Also:
    Constant Field Values

### Quote

    public static final java.lang.String Quote

  Quoted Text

  See Also:
    Constant Field Values

### Center

    public static final java.lang.String Center

  Center the block

  See Also:
    Constant Field Values

### Listing

    public static final java.lang.String Listing

  Code listing style

  See Also:
    Constant Field Values

### Plain

    public static final java.lang.String Plain

  Plain text

  See Also:
    Constant Field Values

### Xmp

    public static final java.lang.String Xmp

  Old pre format - preserve line breaks

  See Also:
    Constant Field Values

### Div

    public static final java.lang.String Div

  Basic Division

  See Also:
    Constant Field Values

### Left

    public static final java.lang.String Left

  Left align

  See Also:
    Constant Field Values

### Right

    public static final java.lang.String Right

  Right align

  See Also:
    Constant Field Values

### Bold

    public static final java.lang.String Bold

  Bold

  See Also:
    Constant Field Values

### Italic

    public static final java.lang.String Italic

  Italic

  See Also:
    Constant Field Values

### Span

    public static final java.lang.String Span

  Span

  See Also:
    Constant Field Values

Constructor Detail

### Block

    public Block(java.lang.String tag)

  Construct a block using the passed string as the tag.

  Parameters:
    `tag` - The tag to use to open and close the block.

### Block

    public Block(java.lang.String tag,
                 java.lang.String attributes)

  Construct a block using the passed string as the tag.

  Parameters:
    `tag` - The tag to use to open and close the block.
    `attributes` - String of attributes for opening tag.

Method Detail

### write

    public void write(java.io.Writer out)
               throws java.io.IOException

  Description copied from class: `Composite`
  Write the composite. The default implementation writes the elements sequentially. May be overridden for more specialized behaviour.

  Overrides:
    `write` in class `Composite`
  Parameters:
    `out` - Writer to write the element to.
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.