R - the builder type returned from build methodspublic abstract class AbstractElementBuilderBase<R extends ElementBuilderBase<?>> extends java.lang.Object implements ElementBuilderBase<R>
ElementBuilderBase.
Subclasses of AbstractElementBuilderBase act as typed wrappers around
a shared implementation that handles the actual building. The wrappers merely
delegate to the shared implementation, so wrapper instances can be reused,
avoiding object creation. This approach is necessary so that the return value
of common methods, such as ElementBuilderBase.id(String), return a typed builder
instead of the generic ElementBuilderBase.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractElementBuilderBase(ElementBuilderImpl delegate,
boolean isEndTagForbidden) |
| Modifier and Type | Method and Description |
|---|---|
void |
end()
End the current element without checking its type.
|
void |
end(java.lang.String tagName)
End the current element after checking that its tag is the specified
tagName.
|
void |
endAnchor()
End the current element.
|
void |
endArea()
End the current element.
|
void |
endAudio()
End the current element.
|
void |
endBase()
End the current element.
|
void |
endBlockQuote()
End the current element.
|
void |
endBody()
End the current element.
|
void |
endBR()
End the current element.
|
void |
endButton()
End the current element.
|
void |
endCanvas()
End the current element.
|
void |
endCol()
End the current element.
|
void |
endColGroup()
End the current element.
|
void |
endDiv()
End the current element.
|
void |
endDList()
End the current element.
|
void |
endFieldSet()
End the current element.
|
void |
endForm()
End the current element.
|
void |
endFrame()
End the current element.
|
void |
endFrameSet()
End the current element.
|
void |
endH1()
End the current element.
|
void |
endH2()
End the current element.
|
void |
endH3()
End the current element.
|
void |
endH4()
End the current element.
|
void |
endH5()
End the current element.
|
void |
endH6()
End the current element.
|
void |
endHead()
End the current element.
|
void |
endHR()
End the current element.
|
void |
endIFrame()
End the current element.
|
void |
endImage()
End the current element.
|
void |
endInput()
End the current element.
|
void |
endLabel()
End the current element.
|
void |
endLegend()
End the current element.
|
void |
endLI()
End the current element.
|
void |
endLink()
End the current element.
|
void |
endMap()
End the current element.
|
void |
endMeta()
End the current element.
|
void |
endOList()
End the current element.
|
void |
endOptGroup()
End the current element.
|
void |
endOption()
End the current element.
|
void |
endParagraph()
End the current element.
|
void |
endParam()
End the current element.
|
void |
endPre()
End the current element.
|
void |
endQuote()
End the current element.
|
void |
endScript()
End the current element.
|
void |
endSelect()
End the current element.
|
void |
endSource()
End the current element.
|
void |
endSpan()
End the current element.
|
void |
endStyle()
End the current element.
|
void |
endTable()
End the current element.
|
void |
endTableCaption()
End the current element.
|
void |
endTBody()
End the current element.
|
void |
endTD()
End the current element.
|
void |
endTextArea()
End the current element.
|
void |
endTFoot()
End the current element.
|
void |
endTH()
End the current element.
|
void |
endTHead()
End the current element.
|
void |
endTR()
End the current element.
|
void |
endUList()
End the current element.
|
void |
endVideo()
End the current element.
|
Element |
finish()
Return the built DOM as an
Element. |
int |
getDepth()
Get the element depth of the current builder.
|
protected R |
getReturnBuilder()
Get the builder to return from build methods.
|
R |
html(SafeHtml html)
Append html within the node.
|
boolean |
isChildElementSupported()
Check if child elements are supported.
|
boolean |
isEndTagForbidden()
Check if an end tag is forbidden for this element.
|
StylesBuilder |
style()
Start the
StylesBuilder used to add style properties to the style
attribute of the current element. |
R |
text(java.lang.String text)
Append text within the node.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattribute, attribute, className, dir, draggable, id, lang, startAnchor, startArea, startAudio, startBase, startBlockQuote, startBody, startBR, startButtonInput, startCanvas, startCheckboxInput, startCol, startColGroup, startDiv, startDList, startFieldSet, startFileInput, startForm, startFrame, startFrameSet, startH1, startH2, startH3, startH4, startH5, startH6, startHead, startHiddenInput, startHR, startIFrame, startImage, startImageInput, startLabel, startLegend, startLI, startLink, startMap, startMeta, startOList, startOptGroup, startOption, startParagraph, startParam, startPasswordInput, startPre, startPushButton, startQuote, startRadioInput, startResetButton, startResetInput, startScript, startSelect, startSource, startSpan, startStyle, startSubmitButton, startSubmitInput, startTable, startTableCaption, startTBody, startTD, startTextArea, startTextInput, startTFoot, startTH, startTHead, startTR, startUList, startVideo, tabIndex, title, trustedStartprotected AbstractElementBuilderBase(ElementBuilderImpl delegate, boolean isEndTagForbidden)
public void end()
ElementBuilderBaseend in interface ElementBuilderBase<R extends ElementBuilderBase<?>>public void end(java.lang.String tagName)
ElementBuilderBaseend in interface ElementBuilderBase<R extends ElementBuilderBase<?>>tagName - the expected tagName of the current elementElementBuilderBase.end()public void endAnchor()
ElementBuilderBaseendAnchor in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endArea()
ElementBuilderBaseendArea in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endAudio()
ElementBuilderBaseendAudio in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endBase()
ElementBuilderBaseendBase in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endBlockQuote()
ElementBuilderBaseendBlockQuote in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endBody()
ElementBuilderBaseendBody in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endBR()
ElementBuilderBaseendBR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endButton()
ElementBuilderBaseendButton in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endCanvas()
ElementBuilderBaseendCanvas in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endCol()
ElementBuilderBaseendCol in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endColGroup()
ElementBuilderBaseendColGroup in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endDiv()
ElementBuilderBaseendDiv in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endDList()
ElementBuilderBaseendDList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endFieldSet()
ElementBuilderBaseendFieldSet in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endForm()
ElementBuilderBaseendForm in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endFrame()
ElementBuilderBaseendFrame in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endFrameSet()
ElementBuilderBaseendFrameSet in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH1()
ElementBuilderBaseendH1 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH2()
ElementBuilderBaseendH2 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH3()
ElementBuilderBaseendH3 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH4()
ElementBuilderBaseendH4 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH5()
ElementBuilderBaseendH5 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endH6()
ElementBuilderBaseendH6 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endHead()
ElementBuilderBaseendHead in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endHR()
ElementBuilderBaseendHR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endIFrame()
ElementBuilderBaseendIFrame in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endImage()
ElementBuilderBaseendImage in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endInput()
ElementBuilderBaseendInput in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endLabel()
ElementBuilderBaseendLabel in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endLegend()
ElementBuilderBaseendLegend in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endLI()
ElementBuilderBaseendLI in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endLink()
ElementBuilderBaseendLink in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endMap()
ElementBuilderBaseendMap in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endMeta()
ElementBuilderBaseendMeta in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endOList()
ElementBuilderBaseendOList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endOptGroup()
ElementBuilderBaseendOptGroup in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endOption()
ElementBuilderBaseendOption in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endParagraph()
ElementBuilderBaseendParagraph in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endParam()
ElementBuilderBaseendParam in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endPre()
ElementBuilderBaseendPre in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endQuote()
ElementBuilderBaseendQuote in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endScript()
ElementBuilderBaseendScript in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endSelect()
ElementBuilderBaseendSelect in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endSource()
ElementBuilderBaseendSource in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endSpan()
ElementBuilderBaseendSpan in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endStyle()
ElementBuilderBaseendStyle in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTable()
ElementBuilderBaseendTable in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTableCaption()
ElementBuilderBaseendTableCaption in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTBody()
ElementBuilderBaseendTBody in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTD()
ElementBuilderBaseendTD in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTextArea()
ElementBuilderBaseendTextArea in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTFoot()
ElementBuilderBaseendTFoot in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTH()
ElementBuilderBaseendTH in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTHead()
ElementBuilderBaseendTHead in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endTR()
ElementBuilderBaseendTR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endUList()
ElementBuilderBaseendUList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public void endVideo()
ElementBuilderBaseendVideo in interface ElementBuilderBase<R extends ElementBuilderBase<?>>ElementBuilderBase.end()public Element finish()
ElementBuilderBaseElement.
Any lingering open elements are automatically closed. Once you call
ElementBuilderBase.finish(), you can not longer call any other methods in this class.
finish in interface ElementBuilderBase<R extends ElementBuilderBase<?>>Element that was builtpublic int getDepth()
ElementBuilderBasegetDepth in interface ElementBuilderBase<R extends ElementBuilderBase<?>>public R html(SafeHtml html)
ElementBuilderBaseOnce you append HTML to the element, you can no longer set attributes.
html in interface ElementBuilderBase<R extends ElementBuilderBase<?>>html - the HTML to appendpublic boolean isChildElementSupported()
ElementBuilderBaseisChildElementSupported in interface ElementBuilderBase<R extends ElementBuilderBase<?>>public boolean isEndTagForbidden()
ElementBuilderBaseUnsupportedOperationException.isEndTagForbidden in interface ElementBuilderBase<R extends ElementBuilderBase<?>>public StylesBuilder style()
ElementBuilderBaseStylesBuilder used to add style properties to the style
attribute of the current element.style in interface ElementBuilderBase<R extends ElementBuilderBase<?>>StylesBuilderpublic R text(java.lang.String text)
ElementBuilderBaseOnce you append text to the element, you can no longer set attributes.
A string-based implementation will escape the text to prevent HTML/javascript code from executing. DOM based implementations are not required to escape the text if they directly set the innerText of an element.
text in interface ElementBuilderBase<R extends ElementBuilderBase<?>>text - the text to appendprotected R getReturnBuilder()