T - Class derived from HtmlElement@ConsumerType public abstract class AbstractHtmlElementFactory<T extends HtmlElement> extends AbstractElement<T>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHtmlElementFactory(String name)
Initializes html element factory.
|
| Modifier and Type | Method and Description |
|---|---|
HtmlElement |
create(String elementName)
Creates and adds html element.
|
Anchor |
createAnchor()
Creates and adds anchor (a) element.
|
Anchor |
createAnchor(String href)
Creates and adds anchor (a) element.
|
Anchor |
createAnchor(String href,
String target)
Creates and adds anchor (a) element.
|
Audio |
createAudio()
Creates and adds audio element.
|
HtmlComment |
createComment(String text)
Creates and adds html comment.
|
Div |
createDiv()
Creates and adds div element.
|
FigCaption |
createFigCaption()
Creates and adds figure caption element.
|
Figure |
createFigure()
Creates and adds figure element.
|
Image |
createImage()
Creates and adds imgage (img) element.
|
Image |
createImage(String src)
Creates and adds imgage (img) element.
|
Image |
createImage(String src,
int width,
int height)
Creates and adds imgage (img) element.
|
Image |
createImage(String src,
String alt)
Creates and adds imgage (img) element.
|
Image |
createImage(String src,
String alt,
int width,
int height)
Creates and adds imgage (img) element.
|
NoScript |
createNoScript()
Creates and adds noscript element.
|
Script |
createScript()
Creates and adds script element.
|
Script |
createScript(String script)
Creates and adds script element.
|
Source |
createSource()
Creates and adds source element.
|
Span |
createSpan()
Creates and adds span element.
|
Span |
createSpan(String text)
Creates and adds span element.
|
Video |
createVideo()
Creates and adds video element.
|
add, addContent, addContent, addContent, addContent, addContent, getAttributeValueAsInteger, getAttributeValueAsLong, setAttribute, setAttribute, setAttributeValueAsInteger, setAttributeValueAsLong, setName, setText, toString, toStringContentOnlyaddNamespaceDeclaration, canContainContent, clone, cloneContent, coalesceText, detach, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, getXMLBaseURI, hasAdditionalNamespaces, hasAttributes, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setNamespace, sortAttributes, sortChildren, sortContent, sortContentequals, getCType, getDocument, getParent, getParentElement, hashCode, setParentprotected AbstractHtmlElementFactory(String name)
name - Element namepublic HtmlElement create(String elementName)
elementName - Element namepublic HtmlComment createComment(String text)
text - Commentpublic Div createDiv()
public Span createSpan()
public Span createSpan(String text)
text - Textpublic Anchor createAnchor()
public Anchor createAnchor(String href)
href - Html "href" attribute.public Anchor createAnchor(String href, String target)
href - Html "href" attribute.target - Html "target" attribute.public Image createImage()
public Image createImage(String src)
src - Html "src" attribute.public Image createImage(String src, String alt)
src - Html "src" attribute.alt - Html "alt" attribute.public Image createImage(String src, int width, int height)
src - Html "src" attribute.width - Html "width" attribute.height - Html "height" attribute.public Image createImage(String src, String alt, int width, int height)
src - Html "src" attribute.alt - Html "alt" attribute.width - Html "width" attribute.height - Html "height" attribute.public Script createScript()
public Script createScript(String script)
script - Script blockpublic NoScript createNoScript()
public Figure createFigure()
public FigCaption createFigCaption()
public Video createVideo()
public Audio createAudio()
public Source createSource()
Copyright © 2014–2017 wcm.io. All rights reserved.