Class AbstractElementBuilderBase<R extends ElementBuilderBase<?>>
- Type Parameters:
R
- the builder type returned from build methods
- All Implemented Interfaces:
ElementBuilderBase<R>
- Direct Known Subclasses:
DomElementBuilderBase
,HtmlElementBuilderBase
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
.
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractElementBuilderBase
(ElementBuilderImpl delegate, boolean isEndTagForbidden) -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
End the current element without checking its type.void
End the current element after checking that its tag is the specified tagName.void
End the current element.void
endArea()
End the current element.void
endAudio()
End the current element.void
endBase()
End the current element.void
End the current element.void
endBody()
End the current element.void
endBR()
End the current element.void
End the current element.void
End the current element.void
endCol()
End the current element.void
End the current element.void
endDiv()
End the current element.void
endDList()
End the current element.void
End the current element.void
endForm()
End the current element.void
endFrame()
End the current element.void
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
End the current element.void
endImage()
End the current element.void
endInput()
End the current element.void
endLabel()
End the current element.void
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
End the current element.void
End the current element.void
End the current element.void
endParam()
End the current element.void
endPre()
End the current element.void
endQuote()
End the current element.void
End the current element.void
End the current element.void
End the current element.void
endSpan()
End the current element.void
endStyle()
End the current element.void
endTable()
End the current element.void
End the current element.void
endTBody()
End the current element.void
endTD()
End the current element.void
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.finish()
Return the built DOM as anElement
.int
getDepth()
Get the element depth of the current builder.protected R
Get the builder to return from build methods.Append html within the node.boolean
Check if child elements are supported.boolean
Check if an end tag is forbidden for this element.style()
Start theStylesBuilder
used to add style properties to the style attribute of the current element.Append text within the node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.gwt.dom.builder.shared.ElementBuilderBase
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
-
Constructor Details
-
Method Details
-
end
public void end()Description copied from interface:ElementBuilderBase
End the current element without checking its type.- Specified by:
end
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
-
end
Description copied from interface:ElementBuilderBase
End the current element after checking that its tag is the specified tagName.- Specified by:
end
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Parameters:
tagName
- the expected tagName of the current element- See Also:
-
endAnchor
public void endAnchor()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endAnchor
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endArea
public void endArea()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endArea
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endAudio
public void endAudio()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endAudio
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endBase
public void endBase()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endBase
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endBlockQuote
public void endBlockQuote()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endBlockQuote
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endBody
public void endBody()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endBody
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endBR
public void endBR()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endBR
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endButton
public void endButton()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endButton
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endCanvas
public void endCanvas()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endCanvas
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endCol
public void endCol()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endCol
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endColGroup
public void endColGroup()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endColGroup
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endDiv
public void endDiv()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endDiv
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endDList
public void endDList()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endDList
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endFieldSet
public void endFieldSet()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endFieldSet
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endForm
public void endForm()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endForm
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endFrame
public void endFrame()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endFrame
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endFrameSet
public void endFrameSet()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endFrameSet
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH1
public void endH1()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH1
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH2
public void endH2()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH2
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH3
public void endH3()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH3
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH4
public void endH4()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH4
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH5
public void endH5()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH5
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endH6
public void endH6()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endH6
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endHead
public void endHead()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endHead
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endHR
public void endHR()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endHR
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endIFrame
public void endIFrame()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endIFrame
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endImage
public void endImage()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endImage
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endInput
public void endInput()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endInput
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endLabel
public void endLabel()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endLabel
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endLegend
public void endLegend()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endLegend
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endLI
public void endLI()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endLI
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endLink
public void endLink()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endLink
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endMap
public void endMap()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endMap
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endMeta
public void endMeta()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endMeta
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endOList
public void endOList()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endOList
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endOptGroup
public void endOptGroup()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endOptGroup
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endOption
public void endOption()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endOption
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endParagraph
public void endParagraph()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endParagraph
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endParam
public void endParam()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endParam
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endPre
public void endPre()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endPre
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endQuote
public void endQuote()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endQuote
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endScript
public void endScript()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endScript
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endSelect
public void endSelect()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endSelect
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endSource
public void endSource()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endSource
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endSpan
public void endSpan()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endSpan
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endStyle
public void endStyle()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endStyle
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTable
public void endTable()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTable
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTableCaption
public void endTableCaption()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTableCaption
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTBody
public void endTBody()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTBody
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTD
public void endTD()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTD
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTextArea
public void endTextArea()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTextArea
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTFoot
public void endTFoot()Description copied from interface:ElementBuilderBase
End the current element. . *- Specified by:
endTFoot
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTH
public void endTH()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTH
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTHead
public void endTHead()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTHead
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endTR
public void endTR()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endTR
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endUList
public void endUList()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endUList
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
endVideo
public void endVideo()Description copied from interface:ElementBuilderBase
End the current element.- Specified by:
endVideo
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- See Also:
-
finish
Description copied from interface:ElementBuilderBase
Return the built DOM as anElement
.Any lingering open elements are automatically closed. Once you call
ElementBuilderBase.finish()
, you can not longer call any other methods in this class.- Specified by:
finish
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Returns:
- the
Element
that was built
-
getDepth
public int getDepth()Description copied from interface:ElementBuilderBase
Get the element depth of the current builder.- Specified by:
getDepth
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
-
isChildElementSupported
public boolean isChildElementSupported()Description copied from interface:ElementBuilderBase
Check if child elements are supported.- Specified by:
isChildElementSupported
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Returns:
- true if supported, false if not.
-
isEndTagForbidden
public boolean isEndTagForbidden()Description copied from interface:ElementBuilderBase
Check if an end tag is forbidden for this element. If the end tag is forbidden, then setting inner html or text or appending an element will trigger anUnsupportedOperationException
.- Specified by:
isEndTagForbidden
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Returns:
- true if forbidden, false if not
-
style
Description copied from interface:ElementBuilderBase
Start theStylesBuilder
used to add style properties to the style attribute of the current element.- Specified by:
style
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Returns:
- the
StylesBuilder
-
text
Description copied from interface:ElementBuilderBase
Append text within the node.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.
- Specified by:
text
in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
- Parameters:
text
- the text to append- Returns:
- this builder
-
getReturnBuilder
Get the builder to return from build methods.- Returns:
- the return builder
-