org.mortbay.html

Class Block

Known Direct 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 String
Bold
Bold
static String
Center
Center the block
static String
Div
Basic Division
static String
Italic
Italic
static String
Left
Left align
static String
Listing
Code listing style
static String
Plain
Plain text
static String
Pre
Preformatted text
static String
Quote
Quoted Text
static String
Right
Right align
static String
Span
Span
static 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, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH, attributeMap, noAttributes

Constructor Summary

Block(String tag)
Construct a block using the passed string as the tag.
Block(String tag, String attributes)
Construct a block using the passed string as the tag.

Method Summary

void
write(Writer out)

Methods inherited from class org.mortbay.html.Composite

add, contents, nest, replace, reset, setNest, size, unnest, write

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, size, style, toString, top, width, width, width, write, write, write

Field Details

Bold

public static final String Bold
Bold

Center

public static final String Center
Center the block

Div

public static final String Div
Basic Division

Italic

public static final String Italic
Italic

Left

public static final String Left
Left align

Listing

public static final String Listing
Code listing style

Plain

public static final String Plain
Plain text

Pre

public static final String Pre
Preformatted text

Quote

public static final String Quote
Quoted Text

Right

public static final String Right
Right align

Span

public static final String Span
Span

Xmp

public static final String Xmp
Old pre format - preserve line breaks

Constructor Details

Block

public Block(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(String tag,
             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 Details

write

public void write(Writer out)
            throws IOException
Overrides:
write in interface Composite

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.