com.vladium.emma.report.html.doc
Class HTMLDocument

java.lang.Object
  extended bycom.vladium.emma.report.html.doc.ISimpleElement.Factory.SimpleElementImpl
      extended bycom.vladium.emma.report.html.doc.IElement.Factory.ElementImpl
          extended bycom.vladium.emma.report.html.doc.HTMLDocument
All Implemented Interfaces:
IContent, IElement, IElementList, ISimpleElement

public final class HTMLDocument
extends IElement.Factory.ElementImpl

Author:
Vlad Roubtsov, (C) 2003

Nested Class Summary
 
Nested classes inherited from class com.vladium.emma.report.html.doc.IElement
IElement.Factory
 
Field Summary
protected  AttributeSet m_attrs
           
private  IElement m_body
           
protected  java.util.List m_contents
           
private  IContent m_footer
           
private  IElement m_head
           
private  IContent m_header
           
protected  Tag m_tag
           
private  java.lang.String m_title
           
 
Constructor Summary
HTMLDocument()
           
HTMLDocument(java.lang.String title, java.lang.String encoding)
           
 
Method Summary
 IElementList add(IContent content)
          Overridden to add to the doc body.
 IElementList add(int index, IContent content)
           
 void addEmptyP()
           
 void addH(int level, IContent text, java.lang.String classID)
           
 void addH(int level, java.lang.String text, java.lang.String classID)
           
 void addHR(int size)
           
 void addLINK(java.lang.String type, java.lang.String href)
          Adds a <LINK> to the head.
 void addStyle(java.lang.String css)
           
 void emit(HTMLWriter out)
          Overridden to ensure header/footer appear first/last in the body.
 AttributeSet getAttributes()
           
 IElement getBody()
           
 IContent getFooter()
           
 IElement getHead()
           
 IContent getHeader()
           
 Tag getTag()
           
 java.lang.String getTitle()
           
 ISimpleElement setClass(java.lang.String classID)
           
 void setFooter(IContent footer)
           
 void setHeader(IContent header)
           
 IElement setText(java.lang.String text, boolean nbsp)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vladium.emma.report.html.doc.ISimpleElement
getAttributes, getTag, setClass
 

Field Detail

m_title

private final java.lang.String m_title

m_head

private final IElement m_head

m_body

private final IElement m_body

m_header

private IContent m_header

m_footer

private IContent m_footer

m_contents

protected final java.util.List m_contents

m_tag

protected final Tag m_tag

m_attrs

protected final AttributeSet m_attrs
Constructor Detail

HTMLDocument

public HTMLDocument()

HTMLDocument

public HTMLDocument(java.lang.String title,
                    java.lang.String encoding)
Method Detail

getTitle

public java.lang.String getTitle()

getHead

public IElement getHead()

getBody

public IElement getBody()

getHeader

public IContent getHeader()

getFooter

public IContent getFooter()

setHeader

public void setHeader(IContent header)

setFooter

public void setFooter(IContent footer)

emit

public void emit(HTMLWriter out)
Overridden to ensure header/footer appear first/last in the body.

Specified by:
emit in interface IContent
Overrides:
emit in class IElement.Factory.ElementImpl

add

public IElementList add(IContent content)
Overridden to add to the doc body.

Specified by:
add in interface IElementList
Overrides:
add in class IElement.Factory.ElementImpl

addStyle

public void addStyle(java.lang.String css)

addLINK

public void addLINK(java.lang.String type,
                    java.lang.String href)
Adds a <LINK> to the head.


addH

public void addH(int level,
                 java.lang.String text,
                 java.lang.String classID)

addH

public void addH(int level,
                 IContent text,
                 java.lang.String classID)

addHR

public void addHR(int size)

addEmptyP

public void addEmptyP()

toString

public java.lang.String toString()
Overrides:
toString in class ISimpleElement.Factory.SimpleElementImpl

add

public IElementList add(int index,
                        IContent content)
Specified by:
add in interface IElementList

size

public int size()
Specified by:
size in interface IElementList

setText

public IElement setText(java.lang.String text,
                        boolean nbsp)
Specified by:
setText in interface IElement

getTag

public Tag getTag()
Specified by:
getTag in interface ISimpleElement

setClass

public ISimpleElement setClass(java.lang.String classID)
Specified by:
setClass in interface ISimpleElement

getAttributes

public AttributeSet getAttributes()
Specified by:
getAttributes in interface ISimpleElement