public class HTMLElement extends XMLElement
XMLElement with utility methods to create XHTML documents. It
provides methods of HTML tags to avoid magic strings in the generators.writer| Modifier | Constructor | Description |
|---|---|---|
protected |
HTMLElement(java.io.Writer writer,
java.lang.String name) |
Creates a new element for a HTML document.
|
| Modifier and Type | Method | Description |
|---|---|---|
HTMLElement |
a(java.lang.String hrefattr) |
Creates a 'a' element.
|
HTMLElement |
a(java.lang.String hrefattr,
java.lang.String classattr) |
Creates a 'a' element.
|
HTMLElement |
a(ILinkable linkable,
ReportOutputFolder base) |
Creates a link to the given
ILinkable. |
HTMLElement |
code() |
Creates a 'code' element.
|
HTMLElement |
div(java.lang.String classattr) |
Creates a 'div' element.
|
HTMLElement |
element(java.lang.String name) |
Creates a new child element for this element,
|
HTMLElement |
h1() |
Creates a 'h1' element.
|
void |
img(java.lang.String srcattr,
int widthattr,
int heightattr,
java.lang.String titleattr) |
Creates a 'img' element.
|
HTMLElement |
link(java.lang.String relattr,
java.lang.String hrefattr,
java.lang.String typeattr) |
Creates a 'link' element.
|
HTMLElement |
meta(java.lang.String httpequivattr,
java.lang.String contentattr) |
Creates a 'meta' element.
|
HTMLElement |
p() |
Creates a 'p' element.
|
HTMLElement |
pre(java.lang.String classattr) |
Creates a 'pre' element.
|
void |
script(java.lang.String typeattr,
java.lang.String srcattr) |
Creates a 'script' element.
|
HTMLElement |
span() |
Creates a 'span' element.
|
HTMLElement |
span(java.lang.String classattr) |
Creates a 'span' element.
|
HTMLElement |
span(java.lang.String classattr,
java.lang.String idattr) |
Creates a 'span' element.
|
HTMLElement |
table(java.lang.String classattr) |
Creates a 'table' element.
|
HTMLElement |
tbody() |
Creates a 'tbody' element.
|
HTMLElement |
td() |
Creates a 'td' element.
|
HTMLElement |
td(java.lang.String classattr) |
Creates a 'td' element.
|
HTMLElement |
tfoot() |
Creates a 'tfoot' element.
|
HTMLElement |
thead() |
Creates a 'thead' element.
|
HTMLElement |
title() |
Creates a 'title' element.
|
HTMLElement |
tr() |
Creates a 'tr' element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChildElement, attr, attr, attr, beginOpenTag, close, textprotected HTMLElement(java.io.Writer writer,
java.lang.String name)
writer - all output will be written directly to thisname - element namepublic HTMLElement element(java.lang.String name) throws java.io.IOException
XMLElementelement in class XMLElementname - name of the child elementjava.io.IOException - in case of problems with the writerpublic HTMLElement meta(java.lang.String httpequivattr, java.lang.String contentattr) throws java.io.IOException
httpequivattr - value of the http-equiv attributecontentattr - value for the content attributejava.io.IOException - in case of problems with the writerpublic HTMLElement link(java.lang.String relattr, java.lang.String hrefattr, java.lang.String typeattr) throws java.io.IOException
relattr - value of the rel attributehrefattr - value for the href attributetypeattr - value for the type attributejava.io.IOException - in case of problems with the writerpublic HTMLElement title() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement h1() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement p() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement span() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement span(java.lang.String classattr) throws java.io.IOException
classattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic HTMLElement span(java.lang.String classattr, java.lang.String idattr) throws java.io.IOException
classattr - value of the class attributeidattr - value of the id attributejava.io.IOException - in case of problems with the writerpublic HTMLElement div(java.lang.String classattr) throws java.io.IOException
classattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic HTMLElement code() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement pre(java.lang.String classattr) throws java.io.IOException
classattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic HTMLElement a(java.lang.String hrefattr) throws java.io.IOException
hrefattr - value of the href attributejava.io.IOException - in case of problems with the writerpublic HTMLElement a(java.lang.String hrefattr, java.lang.String classattr) throws java.io.IOException
hrefattr - value of the href attributeclassattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic HTMLElement a(ILinkable linkable, ReportOutputFolder base) throws java.io.IOException
ILinkable.linkable - object to link tobase - base folder where the link should be placedjava.io.IOException - in case of problems with the writerpublic HTMLElement table(java.lang.String classattr) throws java.io.IOException
classattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic HTMLElement thead() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement tfoot() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement tbody() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement tr() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement td() throws java.io.IOException
java.io.IOException - in case of problems with the writerpublic HTMLElement td(java.lang.String classattr) throws java.io.IOException
classattr - value of the class attributejava.io.IOException - in case of problems with the writerpublic void img(java.lang.String srcattr,
int widthattr,
int heightattr,
java.lang.String titleattr)
throws java.io.IOException
srcattr - value of the src attributewidthattr - value of the width attributeheightattr - value of the height attributetitleattr - value of the title and alt attributejava.io.IOException - in case of problems with the writerpublic void script(java.lang.String typeattr,
java.lang.String srcattr)
throws java.io.IOException
typeattr - value of the type attributesrcattr - value of the src attributejava.io.IOException - in case of problems with the writerCopyright © 2018. All rights reserved.