Class AbstractElementBuilderBase<R extends ElementBuilderBase<?>>
- java.lang.Object
-
- com.google.gwt.dom.builder.shared.AbstractElementBuilderBase<R>
-
- Type Parameters:
R- the builder type returned from build methods
- All Implemented Interfaces:
ElementBuilderBase<R>
- Direct Known Subclasses:
DomElementBuilderBase,HtmlElementBuilderBase
public abstract class AbstractElementBuilderBase<R extends ElementBuilderBase<?>> extends java.lang.Object implements ElementBuilderBase<R>
Abstract base class for implementations ofElementBuilderBase.Subclasses of
AbstractElementBuilderBaseact 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 asElementBuilderBase.id(String), return a typed builder instead of the genericElementBuilderBase.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractElementBuilderBase(ElementBuilderImpl delegate, boolean isEndTagForbidden)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()End the current element without checking its type.voidend(java.lang.String tagName)End the current element after checking that its tag is the specified tagName.voidendAnchor()End the current element.voidendArea()End the current element.voidendAudio()End the current element.voidendBase()End the current element.voidendBlockQuote()End the current element.voidendBody()End the current element.voidendBR()End the current element.voidendButton()End the current element.voidendCanvas()End the current element.voidendCol()End the current element.voidendColGroup()End the current element.voidendDiv()End the current element.voidendDList()End the current element.voidendFieldSet()End the current element.voidendForm()End the current element.voidendFrame()End the current element.voidendFrameSet()End the current element.voidendH1()End the current element.voidendH2()End the current element.voidendH3()End the current element.voidendH4()End the current element.voidendH5()End the current element.voidendH6()End the current element.voidendHead()End the current element.voidendHR()End the current element.voidendIFrame()End the current element.voidendImage()End the current element.voidendInput()End the current element.voidendLabel()End the current element.voidendLegend()End the current element.voidendLI()End the current element.voidendLink()End the current element.voidendMap()End the current element.voidendMeta()End the current element.voidendOList()End the current element.voidendOptGroup()End the current element.voidendOption()End the current element.voidendParagraph()End the current element.voidendParam()End the current element.voidendPre()End the current element.voidendQuote()End the current element.voidendScript()End the current element.voidendSelect()End the current element.voidendSource()End the current element.voidendSpan()End the current element.voidendStyle()End the current element.voidendTable()End the current element.voidendTableCaption()End the current element.voidendTBody()End the current element.voidendTD()End the current element.voidendTextArea()End the current element.voidendTFoot()End the current element.voidendTH()End the current element.voidendTHead()End the current element.voidendTR()End the current element.voidendUList()End the current element.voidendVideo()End the current element.Elementfinish()Return the built DOM as anElement.intgetDepth()Get the element depth of the current builder.protected RgetReturnBuilder()Get the builder to return from build methods.Rhtml(SafeHtml html)Append html within the node.booleanisChildElementSupported()Check if child elements are supported.booleanisEndTagForbidden()Check if an end tag is forbidden for this element.StylesBuilderstyle()Start theStylesBuilderused to add style properties to the style attribute of the current element.Rtext(java.lang.String text)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 Detail
-
AbstractElementBuilderBase
protected AbstractElementBuilderBase(ElementBuilderImpl delegate, boolean isEndTagForbidden)
-
-
Method Detail
-
end
public void end()
Description copied from interface:ElementBuilderBaseEnd the current element without checking its type.- Specified by:
endin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
-
end
public void end(java.lang.String tagName)
Description copied from interface:ElementBuilderBaseEnd the current element after checking that its tag is the specified tagName.- Specified by:
endin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Parameters:
tagName- the expected tagName of the current element- See Also:
ElementBuilderBase.end()
-
endAnchor
public void endAnchor()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endAnchorin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endArea
public void endArea()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endAreain interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endAudio
public void endAudio()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endAudioin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endBase
public void endBase()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endBasein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endBlockQuote
public void endBlockQuote()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endBlockQuotein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endBody
public void endBody()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endBodyin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endBR
public void endBR()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endBRin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endButton
public void endButton()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endButtonin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endCanvas
public void endCanvas()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endCanvasin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endCol
public void endCol()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endColin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endColGroup
public void endColGroup()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endColGroupin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endDiv
public void endDiv()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endDivin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endDList
public void endDList()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endDListin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endFieldSet
public void endFieldSet()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endFieldSetin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endForm
public void endForm()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endFormin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endFrame
public void endFrame()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endFramein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endFrameSet
public void endFrameSet()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endFrameSetin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH1
public void endH1()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH1in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH2
public void endH2()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH2in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH3
public void endH3()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH3in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH4
public void endH4()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH4in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH5
public void endH5()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH5in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endH6
public void endH6()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endH6in interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endHead
public void endHead()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endHeadin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endHR
public void endHR()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endHRin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endIFrame
public void endIFrame()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endIFramein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endImage
public void endImage()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endImagein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endInput
public void endInput()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endInputin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endLabel
public void endLabel()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endLabelin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endLegend
public void endLegend()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endLegendin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endLI
public void endLI()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endLIin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endLink
public void endLink()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endLinkin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endMap
public void endMap()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endMapin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endMeta
public void endMeta()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endMetain interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endOList
public void endOList()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endOListin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endOptGroup
public void endOptGroup()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endOptGroupin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endOption
public void endOption()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endOptionin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endParagraph
public void endParagraph()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endParagraphin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endParam
public void endParam()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endParamin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endPre
public void endPre()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endPrein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endQuote
public void endQuote()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endQuotein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endScript
public void endScript()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endScriptin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endSelect
public void endSelect()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endSelectin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endSource
public void endSource()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endSourcein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endSpan
public void endSpan()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endSpanin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endStyle
public void endStyle()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endStylein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTable
public void endTable()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTablein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTableCaption
public void endTableCaption()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTableCaptionin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTBody
public void endTBody()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTBodyin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTD
public void endTD()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTDin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTextArea
public void endTextArea()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTextAreain interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTFoot
public void endTFoot()
Description copied from interface:ElementBuilderBaseEnd the current element. . *- Specified by:
endTFootin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTH
public void endTH()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTHin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTHead
public void endTHead()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTHeadin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endTR
public void endTR()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endTRin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endUList
public void endUList()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endUListin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
endVideo
public void endVideo()
Description copied from interface:ElementBuilderBaseEnd the current element.- Specified by:
endVideoin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- See Also:
ElementBuilderBase.end()
-
finish
public Element finish()
Description copied from interface:ElementBuilderBaseReturn 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:
finishin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Returns:
- the
Elementthat was built
-
getDepth
public int getDepth()
Description copied from interface:ElementBuilderBaseGet the element depth of the current builder.- Specified by:
getDepthin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>
-
html
public R html(SafeHtml html)
Description copied from interface:ElementBuilderBaseAppend html within the node.Once you append HTML to the element, you can no longer set attributes.
- Specified by:
htmlin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Parameters:
html- the HTML to append- Returns:
- this builder
-
isChildElementSupported
public boolean isChildElementSupported()
Description copied from interface:ElementBuilderBaseCheck if child elements are supported.- Specified by:
isChildElementSupportedin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Returns:
- true if supported, false if not.
-
isEndTagForbidden
public boolean isEndTagForbidden()
Description copied from interface:ElementBuilderBaseCheck 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:
isEndTagForbiddenin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Returns:
- true if forbidden, false if not
-
style
public StylesBuilder style()
Description copied from interface:ElementBuilderBaseStart theStylesBuilderused to add style properties to the style attribute of the current element.- Specified by:
stylein interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Returns:
- the
StylesBuilder
-
text
public R text(java.lang.String text)
Description copied from interface:ElementBuilderBaseAppend 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:
textin interfaceElementBuilderBase<R extends ElementBuilderBase<?>>- Parameters:
text- the text to append- Returns:
- this builder
-
getReturnBuilder
protected R getReturnBuilder()
Get the builder to return from build methods.- Returns:
- the return builder
-
-