|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mortbay.html.Element
HTML Element.
This abstract class is the base for all HTML Elements. The feature of an abstract HTML Element is that it can be added to HTML Pages, HTML Composites and several other HTML Elements derivations. Elements may also have attributes set, which are handled by the derived Element.
Page
,
Composite
Field Summary | |
static java.lang.String |
ALIGN
|
static java.lang.String |
BGCOLOR
|
static java.lang.String |
BOTTOM
|
static java.lang.String |
CENTER
|
static java.lang.String |
CLASS
|
static java.lang.String |
COLOR
|
static java.lang.String |
HEIGHT
|
static java.lang.String |
ID
|
static java.lang.String |
LEFT
|
static java.lang.String |
MIDDLE
|
static java.lang.String |
noAttributes
|
static java.lang.String |
RIGHT
|
static java.lang.String |
SIZE
|
static java.lang.String |
STYLE
|
static java.lang.String |
TOP
|
static java.lang.String |
VALIGN
|
static java.lang.String |
WIDTH
|
Constructor Summary | |
Element()
Default constructor. |
|
Element(java.lang.String attributes)
Construct with attributes. |
Method Summary | |
Element |
attribute(java.lang.String attributes)
Add element Attributes. |
Element |
attribute(java.lang.String attribute,
long value)
Add quoted element Attributes and value. |
Element |
attribute(java.lang.String attribute,
java.lang.Object value)
Add quoted element Attributes and value. |
java.lang.String |
attributes()
|
Element |
attributes(java.lang.String attributes)
Deprecated. Use attribute(String). |
Element |
bgColor(java.lang.String color)
set BGCOLOR. |
Element |
bottom()
Bottom align. |
Element |
center()
Center. |
Element |
color(java.lang.String color)
set color. |
Element |
cssClass(java.lang.String c)
set CSS CLASS. |
Element |
cssID(java.lang.String id)
set CSS ID. |
int |
height()
|
Element |
height(int h)
set height. |
Element |
height(java.lang.String h)
set height. |
Element |
left()
left justify. |
Element |
middle()
Middle align. |
Element |
right()
right justify. |
Element |
setAttributesFrom(Element e)
Set attributes from another Element. |
int |
size()
|
Element |
size(int s)
set size. |
Element |
size(java.lang.String s)
set size. |
Element |
style(java.lang.String style)
set Style. |
Element |
top()
Top align. |
java.lang.String |
toString()
Convert Element to String. |
int |
width()
|
Element |
width(int w)
set width. |
Element |
width(java.lang.String w)
set width. |
void |
write(java.io.OutputStream out)
Write Element to an OutputStream. |
void |
write(java.io.OutputStream out,
java.lang.String encoding)
Write Element to an OutputStream. |
abstract void |
write(java.io.Writer out)
Write element to a Writer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String noAttributes
public static final java.lang.String ALIGN
public static final java.lang.String LEFT
public static final java.lang.String RIGHT
public static final java.lang.String CENTER
public static final java.lang.String VALIGN
public static final java.lang.String TOP
public static final java.lang.String BOTTOM
public static final java.lang.String MIDDLE
public static final java.lang.String WIDTH
public static final java.lang.String HEIGHT
public static final java.lang.String SIZE
public static final java.lang.String COLOR
public static final java.lang.String BGCOLOR
public static final java.lang.String STYLE
public static final java.lang.String CLASS
public static final java.lang.String ID
Constructor Detail |
public Element()
public Element(java.lang.String attributes)
attributes
- The initial attributes of the elementMethod Detail |
public abstract void write(java.io.Writer out) throws java.io.IOException
out
- Writer to write the element to.
java.io.IOException
public void write(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream to write the element to.
java.io.IOException
public void write(java.io.OutputStream out, java.lang.String encoding) throws java.io.IOException
out
- OutputStream to write the element to.
java.io.IOException
public java.lang.String attributes()
public Element attributes(java.lang.String attributes)
attributes
- String of HTML attributes to add to the element.
public Element setAttributesFrom(Element e)
e
- Element
public Element attribute(java.lang.String attributes)
attributes
- String of HTML attributes to add to the element.
A null attribute clears the current attributes.
public Element attribute(java.lang.String attribute, java.lang.Object value)
attribute
- String of HTML attribute tagvalue
- String value of the attribute to be quoted
public Element attribute(java.lang.String attribute, long value)
attribute
- String of HTML attribute tagvalue
- String value of the attribute to be quoted
public java.lang.String toString()
toString
in class java.lang.Object
public Element left()
public Element right()
public Element center()
public Element top()
public Element bottom()
public Element middle()
public Element width(int w)
public Element width(java.lang.String w)
public int width()
public Element height(int h)
public Element height(java.lang.String h)
public int height()
public Element size(int s)
public Element size(java.lang.String s)
public int size()
public Element color(java.lang.String color)
public Element bgColor(java.lang.String color)
public Element cssClass(java.lang.String c)
public Element cssID(java.lang.String id)
public Element style(java.lang.String style)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |