GWT 2.7.0

com.google.gwt.dom.builder.shared
Class AbstractElementBuilderBase<R extends ElementBuilderBase<?>>

java.lang.Object
  extended by 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 of 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
protected AbstractElementBuilderBase(ElementBuilderImpl delegate, boolean isEndTagForbidden)
           
 
Method Summary
 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.
 
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: ElementBuilderBase
End the current element without checking its type.

Specified by:
end in interface ElementBuilderBase<R extends ElementBuilderBase<?>>

end

public void end(java.lang.String tagName)
Description copied from interface: ElementBuilderBase
End the current element after checking that its tag is the specified tagName.

Specified by:
end in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
Parameters:
tagName - the expected tagName of the current element
See Also:
ElementBuilderBase.end()

endAnchor

public void endAnchor()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endAnchor in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endArea

public void endArea()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endArea in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endAudio

public void endAudio()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endAudio in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endBase

public void endBase()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endBase in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endBlockQuote

public void endBlockQuote()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endBlockQuote in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endBody

public void endBody()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endBody in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endBR

public void endBR()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endBR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endButton

public void endButton()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endButton in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endCanvas

public void endCanvas()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endCanvas in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endCol

public void endCol()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endCol in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endColGroup

public void endColGroup()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endColGroup in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endDiv

public void endDiv()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endDiv in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endDList

public void endDList()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endDList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endFieldSet

public void endFieldSet()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endFieldSet in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endForm

public void endForm()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endForm in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endFrame

public void endFrame()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endFrame in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endFrameSet

public void endFrameSet()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endFrameSet in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH1

public void endH1()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH1 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH2

public void endH2()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH2 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH3

public void endH3()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH3 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH4

public void endH4()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH4 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH5

public void endH5()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH5 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endH6

public void endH6()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endH6 in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endHead

public void endHead()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endHead in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endHR

public void endHR()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endHR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endIFrame

public void endIFrame()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endIFrame in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endImage

public void endImage()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endImage in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endInput

public void endInput()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endInput in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endLabel

public void endLabel()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endLabel in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endLegend

public void endLegend()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endLegend in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endLI

public void endLI()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endLI in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endLink

public void endLink()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endLink in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endMap

public void endMap()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endMap in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endMeta

public void endMeta()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endMeta in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endOList

public void endOList()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endOList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endOptGroup

public void endOptGroup()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endOptGroup in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endOption

public void endOption()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endOption in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endParagraph

public void endParagraph()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endParagraph in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endParam

public void endParam()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endParam in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endPre

public void endPre()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endPre in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endQuote

public void endQuote()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endQuote in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endScript

public void endScript()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endScript in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endSelect

public void endSelect()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endSelect in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endSource

public void endSource()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endSource in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endSpan

public void endSpan()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endSpan in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endStyle

public void endStyle()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endStyle in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTable

public void endTable()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTable in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTableCaption

public void endTableCaption()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTableCaption in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTBody

public void endTBody()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTBody in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTD

public void endTD()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTD in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTextArea

public void endTextArea()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTextArea in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTFoot

public void endTFoot()
Description copied from interface: ElementBuilderBase
End the current element. . *

Specified by:
endTFoot in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTH

public void endTH()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTH in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTHead

public void endTHead()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTHead in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endTR

public void endTR()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endTR in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endUList

public void endUList()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endUList in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

endVideo

public void endVideo()
Description copied from interface: ElementBuilderBase
End the current element.

Specified by:
endVideo in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
See Also:
ElementBuilderBase.end()

finish

public Element finish()
Description copied from interface: ElementBuilderBase
Return the built DOM as an Element.

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 interface ElementBuilderBase<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 interface ElementBuilderBase<R extends ElementBuilderBase<?>>

html

public R html(SafeHtml html)
Description copied from interface: ElementBuilderBase
Append html within the node.

Once you append HTML to the element, you can no longer set attributes.

Specified by:
html in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
Parameters:
html - the HTML to append
Returns:
this builder

isChildElementSupported

public boolean isChildElementSupported()
Description copied from interface: ElementBuilderBase
Check if child elements are supported.

Specified by:
isChildElementSupported in interface ElementBuilderBase<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 an UnsupportedOperationException.

Specified by:
isEndTagForbidden in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
Returns:
true if forbidden, false if not

style

public StylesBuilder style()
Description copied from interface: ElementBuilderBase
Start the StylesBuilder used to add style properties to the style attribute of the current element.

Specified by:
style in interface ElementBuilderBase<R extends ElementBuilderBase<?>>
Returns:
the StylesBuilder

text

public R text(java.lang.String 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 interface ElementBuilderBase<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

GWT 2.7.0