Class HtmlElementBuilderBase<R extends ElementBuilderBase<?>>
java.lang.Object
com.google.gwt.dom.builder.shared.AbstractElementBuilderBase<R>
com.google.gwt.dom.builder.shared.HtmlElementBuilderBase<R>
- Type Parameters:
R
- the builder type returned from build methods
- All Implemented Interfaces:
ElementBuilderBase<R>
- Direct Known Subclasses:
HtmlAnchorBuilder
,HtmlAreaBuilder
,HtmlBaseBuilder
,HtmlBodyBuilder
,HtmlBRBuilder
,HtmlButtonBuilder
,HtmlCanvasBuilder
,HtmlDivBuilder
,HtmlDListBuilder
,HtmlElementBuilder
,HtmlFieldSetBuilder
,HtmlFormBuilder
,HtmlFrameBuilder
,HtmlFrameSetBuilder
,HtmlHeadBuilder
,HtmlHeadingBuilder
,HtmlHRBuilder
,HtmlIFrameBuilder
,HtmlImageBuilder
,HtmlInputBuilder
,HtmlLabelBuilder
,HtmlLegendBuilder
,HtmlLIBuilder
,HtmlLinkBuilder
,HtmlMapBuilder
,HtmlMediaBuilderBase
,HtmlMetaBuilder
,HtmlOListBuilder
,HtmlOptGroupBuilder
,HtmlOptionBuilder
,HtmlParagraphBuilder
,HtmlParamBuilder
,HtmlPreBuilder
,HtmlQuoteBuilder
,HtmlScriptBuilder
,HtmlSelectBuilder
,HtmlSourceBuilder
,HtmlSpanBuilder
,HtmlStyleBuilder
,HtmlTableBuilder
,HtmlTableCaptionBuilder
,HtmlTableCellBuilder
,HtmlTableColBuilder
,HtmlTableRowBuilder
,HtmlTableSectionBuilder
,HtmlTextAreaBuilder
,HtmlTitleBuilder
,HtmlUListBuilder
public class HtmlElementBuilderBase<R extends ElementBuilderBase<?>>
extends AbstractElementBuilderBase<R>
Implementation of
ElementBuilderBase
that delegates to an
HtmlBuilderImpl
.
Subclasses of HtmlElementBuilderBase
act as typed wrappers around a
shared ElementBuilderBase
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
id(String)
, return a typed builder instead of the generic
ElementBuilderBase
.
-
Constructor Summary
ConstructorDescriptionHtmlElementBuilderBase
(HtmlBuilderImpl delegate) Construct a newHtmlElementBuilderBase
.HtmlElementBuilderBase
(HtmlBuilderImpl delegate, boolean isEndTagForbidden) Construct a newHtmlElementBuilderBase
. -
Method Summary
Modifier and TypeMethodDescriptionReturn the HTML as aSafeHtml
string.Add an integer attribute to the object.Add a string attribute to the object.The class attribute of the element.Specifies the base direction of directionally neutral text and the directionality of tables.Changes the draggable attribute to one ofElement.DRAGGABLE_AUTO
,Element.DRAGGABLE_FALSE
, orElement.DRAGGABLE_TRUE
.void
endTitle()
End the current element.Set the id.Language code defined in RFC 1766.Append a anchor element.Append a area element.Append a audio element.Append a base element.Append a block quote element.Append a body element.startBR()
Append a br element.Append an <input type='button'> element.Append a canvas element.Append an <input type='check'> element.startCol()
Append a tablecol element.Append a tablecol element.startDiv()
Append a div element.Append a dlist element.Append a fieldset element.Append an <input type='file'> element.Append a form element.Append a frame element.Append a frameset element.startH1()
Append a heading element.startH2()
Append a heading element.startH3()
Append a heading element.startH4()
Append a heading element.startH5()
Append a heading element.startH6()
Append a heading element.Append a head element.Append an <input type='hidden'> element.startHR()
Append a hr element.Append a iframe element.Append a image element.Append an <input type='image'> element.Append a label element.Append a legend element.startLI()
Append a li element.Append a link element.startMap()
Append a map element.Append a meta element.Append a olist element.Append a optgroup element.Append an option element.Append a paragraph element.Append a param element.Append an <input type='password'> element.startPre()
Append a pre element.Append a button element with type "button".Append a quote element.startRadioInput
(String name) Append an <input type='radio'> element.Append a button element with type "reset".Append an <input type='reset'> element.Append a script element.Append a select element.Append a source element.Append a span element.Append a style element.Append a button element with type "submit".Append an <input type='submit'> element.Append a table element.Append a table caption element.Append a tbody element.startTD()
Append a td element.Append a textarea element.Append an <input type='text'> element.Append a tfoot element.startTH()
Append a th element.Append a thead element.Append a title element.startTR()
Append a tablerow element.Append a ulist element.Append a video element.tabIndex
(int tabIndex) Set the tab index.The element's advisory title.(package private) R
trustedAttribute
(String name, int value) Add an attribute with a trusted name.(package private) R
trustedAttribute
(String name, String value) Add an attribute with a trusted name.trustedStart
(String tagName) Append a new element with the specified trusted tag name.Methods inherited from class com.google.gwt.dom.builder.shared.AbstractElementBuilderBase
end, end, endAnchor, endArea, endAudio, endBase, endBlockQuote, endBody, endBR, endButton, endCanvas, endCol, endColGroup, endDiv, endDList, endFieldSet, endForm, endFrame, endFrameSet, endH1, endH2, endH3, endH4, endH5, endH6, endHead, endHR, endIFrame, endImage, endInput, endLabel, endLegend, endLI, endLink, endMap, endMeta, endOList, endOptGroup, endOption, endParagraph, endParam, endPre, endQuote, endScript, endSelect, endSource, endSpan, endStyle, endTable, endTableCaption, endTBody, endTD, endTextArea, endTFoot, endTH, endTHead, endTR, endUList, endVideo, finish, getDepth, getReturnBuilder, html, isChildElementSupported, isEndTagForbidden, style, text
-
Constructor Details
-
Method Details
-
asSafeHtml
Return the HTML as aSafeHtml
string. -
attribute
Description copied from interface:ElementBuilderBase
Add an integer attribute to the object.- Returns:
- this builder
-
attribute
Description copied from interface:ElementBuilderBase
Add a string attribute to the object.- Returns:
- this builder
-
className
Description copied from interface:ElementBuilderBase
The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages.- Returns:
- this builder
- See Also:
-
dir
Description copied from interface:ElementBuilderBase
Specifies the base direction of directionally neutral text and the directionality of tables.- Returns:
- this builder
-
draggable
Description copied from interface:ElementBuilderBase
Changes the draggable attribute to one ofElement.DRAGGABLE_AUTO
,Element.DRAGGABLE_FALSE
, orElement.DRAGGABLE_TRUE
.- Parameters:
draggable
- a String constant- Returns:
- this builder
-
endTitle
public void endTitle()End the current element.- See Also:
-
id
Description copied from interface:ElementBuilderBase
Set the id.- Parameters:
id
- the id- Returns:
- this builder
-
lang
Description copied from interface:ElementBuilderBase
Language code defined in RFC 1766.- Returns:
- this builder
-
startAnchor
Description copied from interface:ElementBuilderBase
Append a anchor element.- Returns:
- the builder for the new element
-
startArea
Description copied from interface:ElementBuilderBase
Append a area element.- Returns:
- the builder for the new element
-
startAudio
Description copied from interface:ElementBuilderBase
Append a audio element.- Returns:
- the builder for the new element
-
startBase
Description copied from interface:ElementBuilderBase
Append a base element.- Returns:
- the builder for the new element
-
startBlockQuote
Description copied from interface:ElementBuilderBase
Append a block quote element.- Returns:
- the builder for the new element
-
startBody
Description copied from interface:ElementBuilderBase
Append a body element.- Returns:
- the builder for the new element
-
startBR
Description copied from interface:ElementBuilderBase
Append a br element.- Returns:
- the builder for the new element
-
startButtonInput
Description copied from interface:ElementBuilderBase
Append an <input type='button'> element.- Returns:
- the builder for the new element
-
startCanvas
Description copied from interface:ElementBuilderBase
Append a canvas element.- Returns:
- the builder for the new element
-
startCheckboxInput
Description copied from interface:ElementBuilderBase
Append an <input type='check'> element.- Returns:
- the builder for the new element
-
startCol
Description copied from interface:ElementBuilderBase
Append a tablecol element.- Returns:
- the builder for the new element
-
startColGroup
Description copied from interface:ElementBuilderBase
Append a tablecol element.- Returns:
- the builder for the new element
-
startDiv
Description copied from interface:ElementBuilderBase
Append a div element.- Returns:
- the builder for the new element
-
startDList
Description copied from interface:ElementBuilderBase
Append a dlist element.- Returns:
- the builder for the new element
-
startFieldSet
Description copied from interface:ElementBuilderBase
Append a fieldset element.- Returns:
- the builder for the new element
-
startFileInput
Description copied from interface:ElementBuilderBase
Append an <input type='file'> element.- Returns:
- the builder for the new element
-
startForm
Description copied from interface:ElementBuilderBase
Append a form element.- Returns:
- the builder for the new element
-
startFrame
Description copied from interface:ElementBuilderBase
Append a frame element.- Returns:
- the builder for the new element
-
startFrameSet
Description copied from interface:ElementBuilderBase
Append a frameset element.- Returns:
- the builder for the new element
-
startH1
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startH2
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startH3
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startH4
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startH5
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startH6
Description copied from interface:ElementBuilderBase
Append a heading element.- Returns:
- the builder for the new element
-
startHead
Description copied from interface:ElementBuilderBase
Append a head element.- Returns:
- the builder for the new element
-
startHiddenInput
Description copied from interface:ElementBuilderBase
Append an <input type='hidden'> element.- Returns:
- the builder for the new element
-
startHR
Description copied from interface:ElementBuilderBase
Append a hr element.- Returns:
- the builder for the new element
-
startIFrame
Description copied from interface:ElementBuilderBase
Append a iframe element.- Returns:
- the builder for the new element
-
startImage
Description copied from interface:ElementBuilderBase
Append a image element.- Returns:
- the builder for the new element
-
startImageInput
Description copied from interface:ElementBuilderBase
Append an <input type='image'> element.- Returns:
- the builder for the new element
-
startLabel
Description copied from interface:ElementBuilderBase
Append a label element.- Returns:
- the builder for the new element
-
startLegend
Description copied from interface:ElementBuilderBase
Append a legend element.- Returns:
- the builder for the new element
-
startLI
Description copied from interface:ElementBuilderBase
Append a li element.- Returns:
- the builder for the new element
-
startLink
Description copied from interface:ElementBuilderBase
Append a link element.- Returns:
- the builder for the new element
-
startMap
Description copied from interface:ElementBuilderBase
Append a map element.- Returns:
- the builder for the new element
-
startMeta
Description copied from interface:ElementBuilderBase
Append a meta element.- Returns:
- the builder for the new element
-
startOList
Description copied from interface:ElementBuilderBase
Append a olist element.- Returns:
- the builder for the new element
-
startOptGroup
Description copied from interface:ElementBuilderBase
Append a optgroup element.- Returns:
- the builder for the new element
-
startOption
Description copied from interface:ElementBuilderBase
Append an option element.- Returns:
- the builder for the new element
-
startParagraph
Description copied from interface:ElementBuilderBase
Append a paragraph element.- Returns:
- the builder for the new element
-
startParam
Description copied from interface:ElementBuilderBase
Append a param element.- Returns:
- the builder for the new element
-
startPasswordInput
Description copied from interface:ElementBuilderBase
Append an <input type='password'> element.- Returns:
- the builder for the new element
-
startPre
Description copied from interface:ElementBuilderBase
Append a pre element.- Returns:
- the builder for the new element
-
startPushButton
Description copied from interface:ElementBuilderBase
Append a button element with type "button".- Returns:
- the builder for the new element
-
startQuote
Description copied from interface:ElementBuilderBase
Append a quote element.- Returns:
- the builder for the new element
-
startRadioInput
Description copied from interface:ElementBuilderBase
Append an <input type='radio'> element.- Parameters:
name
- name the name of the radio input (used for grouping)- Returns:
- the builder for the new element
-
startResetButton
Description copied from interface:ElementBuilderBase
Append a button element with type "reset".- Returns:
- the builder for the new element
-
startResetInput
Description copied from interface:ElementBuilderBase
Append an <input type='reset'> element.- Returns:
- the builder for the new element
-
startScript
Description copied from interface:ElementBuilderBase
Append a script element.- Returns:
- the builder for the new element
-
startSelect
Description copied from interface:ElementBuilderBase
Append a select element.- Returns:
- the builder for the new element
-
startSource
Description copied from interface:ElementBuilderBase
Append a source element.- Returns:
- the builder for the new element
-
startSpan
Description copied from interface:ElementBuilderBase
Append a span element.- Returns:
- the builder for the new element
-
startStyle
Description copied from interface:ElementBuilderBase
Append a style element.- Returns:
- the builder for the new element
-
startSubmitButton
Description copied from interface:ElementBuilderBase
Append a button element with type "submit".- Returns:
- the builder for the new element
-
startSubmitInput
Description copied from interface:ElementBuilderBase
Append an <input type='submit'> element.- Returns:
- the builder for the new element
-
startTable
Description copied from interface:ElementBuilderBase
Append a table element.- Returns:
- the builder for the new element
-
startTableCaption
Description copied from interface:ElementBuilderBase
Append a table caption element.- Returns:
- the builder for the new element
-
startTBody
Description copied from interface:ElementBuilderBase
Append a tbody element.- Returns:
- the builder for the new element
-
startTD
Description copied from interface:ElementBuilderBase
Append a td element.- Returns:
- the builder for the new element
-
startTextArea
Description copied from interface:ElementBuilderBase
Append a textarea element.- Returns:
- the builder for the new element
-
startTextInput
Description copied from interface:ElementBuilderBase
Append an <input type='text'> element.- Returns:
- the builder for the new element
-
startTFoot
Description copied from interface:ElementBuilderBase
Append a tfoot element.- Returns:
- the builder for the new element
-
startTH
Description copied from interface:ElementBuilderBase
Append a th element.- Returns:
- the builder for the new element
-
startTHead
Description copied from interface:ElementBuilderBase
Append a thead element.- Returns:
- the builder for the new element
-
startTitle
Append a title element.- Returns:
- the builder for the new element
-
startTR
Description copied from interface:ElementBuilderBase
Append a tablerow element.- Returns:
- the builder for the new element
-
startUList
Description copied from interface:ElementBuilderBase
Append a ulist element.- Returns:
- the builder for the new element
-
startVideo
Description copied from interface:ElementBuilderBase
Append a video element.- Returns:
- the builder for the new element
-
tabIndex
Description copied from interface:ElementBuilderBase
Set the tab index.- Parameters:
tabIndex
- the tab index- Returns:
- this builder
-
title
Description copied from interface:ElementBuilderBase
The element's advisory title.- Returns:
- this builder
-
trustedStart
Description copied from interface:ElementBuilderBase
Append a new element with the specified trusted tag name. The tag name will will not be checked or escaped. The calling code should be carefully reviewed to ensure that the provided tag name will not cause a security issue if including in an HTML document. In general, this means limiting the code to HTML tagName constants supported by the HTML specification.- Parameters:
tagName
- the tag name- Returns:
- the
ElementBuilder
for the new element
-
trustedAttribute
Add an attribute with a trusted name. -
trustedAttribute
Add an attribute with a trusted name. The name is still escaped.
-