Copyright 2002 by aragost

com.aragost.html
Class HtmlElement

java.lang.Object
  |
  +--com.aragost.html.Element
        |
        +--com.aragost.html.HtmlElement
Direct Known Subclasses:
CompositeHtmlElement, Font, InputElement, Link

public abstract class HtmlElement
extends Element


Constructor Summary
HtmlElement()
           
HtmlElement(Element body)
          Creates new HtmlElement
 
Method Summary
 java.lang.String getAttribute(java.lang.String name)
           
 java.util.Map getAttributes()
          Return the attributes to write in the open tag.
 Element getBody()
          Return the body element for this Element.
 int getIntAttribute(java.lang.String name)
           
abstract  java.lang.String getTag()
          Return the html tag for this element.
 void postBodyWrite(HtmlWriter writer)
          Hook for overriding.
 void preBodyWrite(HtmlWriter writer)
          Hook for overriding.
 void setAlign(java.lang.String align)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 void setBgcolor(java.lang.String color)
           
 void setIntAttribute(java.lang.String name, int value)
           
 void setWidth(java.lang.String width)
           
 void writeAttributes(HtmlWriter writer)
           
 void writeTo(HtmlWriter writer)
           
 
Methods inherited from class com.aragost.html.Element
isCellLike, isNowrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlElement

public HtmlElement(Element body)
Creates new HtmlElement


HtmlElement

public HtmlElement()
Method Detail

getTag

public abstract java.lang.String getTag()
Return the html tag for this element.


getAttributes

public java.util.Map getAttributes()
Return the attributes to write in the open tag. Return null if there is no attributes (default).


writeTo

public final void writeTo(HtmlWriter writer)
Specified by:
writeTo in class Element

preBodyWrite

public void preBodyWrite(HtmlWriter writer)
Hook for overriding.


postBodyWrite

public void postBodyWrite(HtmlWriter writer)
Hook for overriding.


writeAttributes

public void writeAttributes(HtmlWriter writer)

getBody

public Element getBody()
Return the body element for this Element.


setAttribute

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

getAttribute

public java.lang.String getAttribute(java.lang.String name)

setIntAttribute

public void setIntAttribute(java.lang.String name,
                            int value)

getIntAttribute

public int getIntAttribute(java.lang.String name)

setAlign

public void setAlign(java.lang.String align)

setWidth

public void setWidth(java.lang.String width)

setBgcolor

public void setBgcolor(java.lang.String color)

Copyright 2002 by aragost