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 and Description |
|---|---|
protected |
HTMLElement(Writer writer,
String name)
Creates a new element for a HTML document.
|
| Modifier and Type | Method and Description |
|---|---|
HTMLElement |
a(ILinkable linkable,
ReportOutputFolder base)
Creates a link to the given
ILinkable. |
HTMLElement |
a(String hrefattr)
Creates a 'a' element.
|
HTMLElement |
a(String hrefattr,
String classattr)
Creates a 'a' element.
|
HTMLElement |
code()
Creates a 'code' element.
|
HTMLElement |
div(String classattr)
Creates a 'div' element.
|
HTMLElement |
element(String name)
Creates a new child element for this element,
|
HTMLElement |
h1()
Creates a 'h1' element.
|
void |
img(String srcattr,
int widthattr,
int heightattr,
String titleattr)
Creates a 'img' element.
|
HTMLElement |
link(String relattr,
String hrefattr,
String typeattr)
Creates a 'link' element.
|
HTMLElement |
meta(String httpequivattr,
String contentattr)
Creates a 'meta' element.
|
HTMLElement |
p()
Creates a 'p' element.
|
HTMLElement |
pre(String classattr)
Creates a 'pre' element.
|
void |
script(String typeattr,
String srcattr)
Creates a 'script' element.
|
HTMLElement |
span()
Creates a 'span' element.
|
HTMLElement |
span(String classattr)
Creates a 'span' element.
|
HTMLElement |
span(String classattr,
String idattr)
Creates a 'span' element.
|
HTMLElement |
table(String classattr)
Creates a 'table' element.
|
HTMLElement |
tbody()
Creates a 'tbody' element.
|
HTMLElement |
td()
Creates a 'td' element.
|
HTMLElement |
td(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.
|
addChildElement, attr, attr, attr, beginOpenTag, close, textpublic HTMLElement element(String name) throws IOException
XMLElementelement in class XMLElementname - name of the child elementIOException - in case of problems with the writerpublic HTMLElement meta(String httpequivattr, String contentattr) throws IOException
httpequivattr - value of the http-equiv attributecontentattr - value for the content attributeIOException - in case of problems with the writerpublic HTMLElement link(String relattr, String hrefattr, String typeattr) throws IOException
relattr - value of the rel attributehrefattr - value for the href attributetypeattr - value for the type attributeIOException - in case of problems with the writerpublic HTMLElement title() throws IOException
IOException - in case of problems with the writerpublic HTMLElement h1() throws IOException
IOException - in case of problems with the writerpublic HTMLElement p() throws IOException
IOException - in case of problems with the writerpublic HTMLElement span() throws IOException
IOException - in case of problems with the writerpublic HTMLElement span(String classattr) throws IOException
classattr - value of the class attributeIOException - in case of problems with the writerpublic HTMLElement span(String classattr, String idattr) throws IOException
classattr - value of the class attributeidattr - value of the id attributeIOException - in case of problems with the writerpublic HTMLElement div(String classattr) throws IOException
classattr - value of the class attributeIOException - in case of problems with the writerpublic HTMLElement code() throws IOException
IOException - in case of problems with the writerpublic HTMLElement pre(String classattr) throws IOException
classattr - value of the class attributeIOException - in case of problems with the writerpublic HTMLElement a(String hrefattr) throws IOException
hrefattr - value of the href attributeIOException - in case of problems with the writerpublic HTMLElement a(String hrefattr, String classattr) throws IOException
hrefattr - value of the href attributeclassattr - value of the class attributeIOException - in case of problems with the writerpublic HTMLElement a(ILinkable linkable, ReportOutputFolder base) throws IOException
ILinkable.linkable - object to link tobase - base folder where the link should be placedIOException - in case of problems with the writerpublic HTMLElement table(String classattr) throws IOException
classattr - value of the class attributeIOException - in case of problems with the writerpublic HTMLElement thead() throws IOException
IOException - in case of problems with the writerpublic HTMLElement tfoot() throws IOException
IOException - in case of problems with the writerpublic HTMLElement tbody() throws IOException
IOException - in case of problems with the writerpublic HTMLElement tr() throws IOException
IOException - in case of problems with the writerpublic HTMLElement td() throws IOException
IOException - in case of problems with the writerpublic HTMLElement td(String classattr) throws IOException
classattr - value of the class attributeIOException - in case of problems with the writerpublic void img(String srcattr, int widthattr, int heightattr, String titleattr) throws IOException
srcattr - value of the src attributewidthattr - value of the width attributeheightattr - value of the height attributetitleattr - value of the title and alt attributeIOException - in case of problems with the writerpublic void script(String typeattr, String srcattr) throws IOException
typeattr - value of the type attributesrcattr - value of the src attributeIOException - in case of problems with the writerCopyright © 2024. All rights reserved.