R
- the builder type returned from build methodspublic abstract class AbstractElementBuilderBase<R extends ElementBuilderBase<?>> extends 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(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(String text)
Append text within the node.
|
attribute, 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, trustedStart
protected AbstractElementBuilderBase(ElementBuilderImpl delegate, boolean isEndTagForbidden)
public void end()
ElementBuilderBase
end
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
public void end(String tagName)
ElementBuilderBase
end
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
tagName
- the expected tagName of the current elementElementBuilderBase.end()
public void endAnchor()
ElementBuilderBase
endAnchor
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endArea()
ElementBuilderBase
endArea
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endAudio()
ElementBuilderBase
endAudio
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endBase()
ElementBuilderBase
endBase
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endBlockQuote()
ElementBuilderBase
endBlockQuote
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endBody()
ElementBuilderBase
endBody
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endBR()
ElementBuilderBase
endBR
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endButton()
ElementBuilderBase
endButton
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endCanvas()
ElementBuilderBase
endCanvas
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endCol()
ElementBuilderBase
endCol
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endColGroup()
ElementBuilderBase
endColGroup
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endDiv()
ElementBuilderBase
endDiv
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endDList()
ElementBuilderBase
endDList
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endFieldSet()
ElementBuilderBase
endFieldSet
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endForm()
ElementBuilderBase
endForm
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endFrame()
ElementBuilderBase
endFrame
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endFrameSet()
ElementBuilderBase
endFrameSet
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH1()
ElementBuilderBase
endH1
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH2()
ElementBuilderBase
endH2
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH3()
ElementBuilderBase
endH3
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH4()
ElementBuilderBase
endH4
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH5()
ElementBuilderBase
endH5
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endH6()
ElementBuilderBase
endH6
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endHead()
ElementBuilderBase
endHead
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endHR()
ElementBuilderBase
endHR
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endIFrame()
ElementBuilderBase
endIFrame
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endImage()
ElementBuilderBase
endImage
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endInput()
ElementBuilderBase
endInput
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endLabel()
ElementBuilderBase
endLabel
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endLegend()
ElementBuilderBase
endLegend
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endLI()
ElementBuilderBase
endLI
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endLink()
ElementBuilderBase
endLink
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endMap()
ElementBuilderBase
endMap
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endMeta()
ElementBuilderBase
endMeta
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endOList()
ElementBuilderBase
endOList
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endOptGroup()
ElementBuilderBase
endOptGroup
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endOption()
ElementBuilderBase
endOption
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endParagraph()
ElementBuilderBase
endParagraph
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endParam()
ElementBuilderBase
endParam
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endPre()
ElementBuilderBase
endPre
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endQuote()
ElementBuilderBase
endQuote
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endScript()
ElementBuilderBase
endScript
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endSelect()
ElementBuilderBase
endSelect
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endSource()
ElementBuilderBase
endSource
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endSpan()
ElementBuilderBase
endSpan
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endStyle()
ElementBuilderBase
endStyle
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTable()
ElementBuilderBase
endTable
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTableCaption()
ElementBuilderBase
endTableCaption
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTBody()
ElementBuilderBase
endTBody
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTD()
ElementBuilderBase
endTD
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTextArea()
ElementBuilderBase
endTextArea
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTFoot()
ElementBuilderBase
endTFoot
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTH()
ElementBuilderBase
endTH
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTHead()
ElementBuilderBase
endTHead
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endTR()
ElementBuilderBase
endTR
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endUList()
ElementBuilderBase
endUList
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public void endVideo()
ElementBuilderBase
endVideo
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
ElementBuilderBase.end()
public Element finish()
ElementBuilderBase
Element
.
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()
ElementBuilderBase
getDepth
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
public R html(SafeHtml html)
ElementBuilderBase
Once 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()
ElementBuilderBase
isChildElementSupported
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
public boolean isEndTagForbidden()
ElementBuilderBase
UnsupportedOperationException
.isEndTagForbidden
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
public StylesBuilder style()
ElementBuilderBase
StylesBuilder
used to add style properties to the style
attribute of the current element.style
in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
StylesBuilder
public R text(String text)
ElementBuilderBase
Once 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()
Copyright © 2018. All rights reserved.