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 ofElementBuilderBasethat delegates to anHtmlBuilderImpl.Subclasses of
HtmlElementBuilderBaseact as typed wrappers around a sharedElementBuilderBaseimplementation 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 asid(String), return a typed builder instead of the genericElementBuilderBase.
-
-
Constructor Summary
Constructors Constructor Description HtmlElementBuilderBase(HtmlBuilderImpl delegate)Construct a newHtmlElementBuilderBase.HtmlElementBuilderBase(HtmlBuilderImpl delegate, boolean isEndTagForbidden)Construct a newHtmlElementBuilderBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SafeHtmlasSafeHtml()Return the HTML as aSafeHtmlstring.Rattribute(java.lang.String name, int value)Add an integer attribute to the object.Rattribute(java.lang.String name, java.lang.String value)Add a string attribute to the object.RclassName(java.lang.String className)The class attribute of the element.Rdir(java.lang.String dir)Specifies the base direction of directionally neutral text and the directionality of tables.Rdraggable(java.lang.String draggable)Changes the draggable attribute to one ofElement.DRAGGABLE_AUTO,Element.DRAGGABLE_FALSE, orElement.DRAGGABLE_TRUE.voidendTitle()End the current element.Rid(java.lang.String id)Set the id.Rlang(java.lang.String lang)Language code defined in RFC 1766.AnchorBuilderstartAnchor()Append a anchor element.AreaBuilderstartArea()Append a area element.AudioBuilderstartAudio()Append a audio element.BaseBuilderstartBase()Append a base element.QuoteBuilderstartBlockQuote()Append a block quote element.BodyBuilderstartBody()Append a body element.BRBuilderstartBR()Append a br element.InputBuilderstartButtonInput()Append an <input type='button'> element.CanvasBuilderstartCanvas()Append a canvas element.InputBuilderstartCheckboxInput()Append an <input type='check'> element.TableColBuilderstartCol()Append a tablecol element.TableColBuilderstartColGroup()Append a tablecol element.DivBuilderstartDiv()Append a div element.DListBuilderstartDList()Append a dlist element.FieldSetBuilderstartFieldSet()Append a fieldset element.InputBuilderstartFileInput()Append an <input type='file'> element.FormBuilderstartForm()Append a form element.FrameBuilderstartFrame()Append a frame element.FrameSetBuilderstartFrameSet()Append a frameset element.HeadingBuilderstartH1()Append a heading element.HeadingBuilderstartH2()Append a heading element.HeadingBuilderstartH3()Append a heading element.HeadingBuilderstartH4()Append a heading element.HeadingBuilderstartH5()Append a heading element.HeadingBuilderstartH6()Append a heading element.HeadBuilderstartHead()Append a head element.InputBuilderstartHiddenInput()Append an <input type='hidden'> element.HRBuilderstartHR()Append a hr element.IFrameBuilderstartIFrame()Append a iframe element.ImageBuilderstartImage()Append a image element.InputBuilderstartImageInput()Append an <input type='image'> element.LabelBuilderstartLabel()Append a label element.LegendBuilderstartLegend()Append a legend element.LIBuilderstartLI()Append a li element.LinkBuilderstartLink()Append a link element.MapBuilderstartMap()Append a map element.MetaBuilderstartMeta()Append a meta element.OListBuilderstartOList()Append a olist element.OptGroupBuilderstartOptGroup()Append a optgroup element.OptionBuilderstartOption()Append an option element.ParagraphBuilderstartParagraph()Append a paragraph element.ParamBuilderstartParam()Append a param element.InputBuilderstartPasswordInput()Append an <input type='password'> element.PreBuilderstartPre()Append a pre element.ButtonBuilderstartPushButton()Append a button element with type "button".QuoteBuilderstartQuote()Append a quote element.InputBuilderstartRadioInput(java.lang.String name)Append an <input type='radio'> element.ButtonBuilderstartResetButton()Append a button element with type "reset".InputBuilderstartResetInput()Append an <input type='reset'> element.ScriptBuilderstartScript()Append a script element.SelectBuilderstartSelect()Append a select element.SourceBuilderstartSource()Append a source element.SpanBuilderstartSpan()Append a span element.StyleBuilderstartStyle()Append a style element.ButtonBuilderstartSubmitButton()Append a button element with type "submit".InputBuilderstartSubmitInput()Append an <input type='submit'> element.TableBuilderstartTable()Append a table element.TableCaptionBuilderstartTableCaption()Append a table caption element.TableSectionBuilderstartTBody()Append a tbody element.TableCellBuilderstartTD()Append a td element.TextAreaBuilderstartTextArea()Append a textarea element.InputBuilderstartTextInput()Append an <input type='text'> element.TableSectionBuilderstartTFoot()Append a tfoot element.TableCellBuilderstartTH()Append a th element.TableSectionBuilderstartTHead()Append a thead element.TitleBuilderstartTitle()Append a title element.TableRowBuilderstartTR()Append a tablerow element.UListBuilderstartUList()Append a ulist element.VideoBuilderstartVideo()Append a video element.RtabIndex(int tabIndex)Set the tab index.Rtitle(java.lang.String title)The element's advisory title.(package private) RtrustedAttribute(java.lang.String name, int value)Add an attribute with a trusted name.(package private) RtrustedAttribute(java.lang.String name, java.lang.String value)Add an attribute with a trusted name.ElementBuildertrustedStart(java.lang.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 Detail
-
HtmlElementBuilderBase
HtmlElementBuilderBase(HtmlBuilderImpl delegate)
Construct a newHtmlElementBuilderBase.- Parameters:
delegate- the delegate that builds the element
-
HtmlElementBuilderBase
HtmlElementBuilderBase(HtmlBuilderImpl delegate, boolean isEndTagForbidden)
Construct a newHtmlElementBuilderBase.- Parameters:
delegate- the delegate that builds the elementisEndTagForbidden- true if the end tag is forbidden for this element
-
-
Method Detail
-
attribute
public R attribute(java.lang.String name, int value)
Description copied from interface:ElementBuilderBaseAdd an integer attribute to the object.- Returns:
- this builder
-
attribute
public R attribute(java.lang.String name, java.lang.String value)
Description copied from interface:ElementBuilderBaseAdd a string attribute to the object.- Returns:
- this builder
-
className
public R className(java.lang.String className)
Description copied from interface:ElementBuilderBaseThe 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:
- W3C HTML Specification
-
dir
public R dir(java.lang.String dir)
Description copied from interface:ElementBuilderBaseSpecifies the base direction of directionally neutral text and the directionality of tables.- Returns:
- this builder
-
draggable
public R draggable(java.lang.String draggable)
Description copied from interface:ElementBuilderBaseChanges 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:
AbstractElementBuilderBase.end()
-
id
public R id(java.lang.String id)
Description copied from interface:ElementBuilderBaseSet the id.- Parameters:
id- the id- Returns:
- this builder
-
lang
public R lang(java.lang.String lang)
Description copied from interface:ElementBuilderBaseLanguage code defined in RFC 1766.- Returns:
- this builder
-
startAnchor
public AnchorBuilder startAnchor()
Description copied from interface:ElementBuilderBaseAppend a anchor element.- Returns:
- the builder for the new element
-
startArea
public AreaBuilder startArea()
Description copied from interface:ElementBuilderBaseAppend a area element.- Returns:
- the builder for the new element
-
startAudio
public AudioBuilder startAudio()
Description copied from interface:ElementBuilderBaseAppend a audio element.- Returns:
- the builder for the new element
-
startBase
public BaseBuilder startBase()
Description copied from interface:ElementBuilderBaseAppend a base element.- Returns:
- the builder for the new element
-
startBlockQuote
public QuoteBuilder startBlockQuote()
Description copied from interface:ElementBuilderBaseAppend a block quote element.- Returns:
- the builder for the new element
-
startBody
public BodyBuilder startBody()
Description copied from interface:ElementBuilderBaseAppend a body element.- Returns:
- the builder for the new element
-
startBR
public BRBuilder startBR()
Description copied from interface:ElementBuilderBaseAppend a br element.- Returns:
- the builder for the new element
-
startButtonInput
public InputBuilder startButtonInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='button'> element.- Returns:
- the builder for the new element
-
startCanvas
public CanvasBuilder startCanvas()
Description copied from interface:ElementBuilderBaseAppend a canvas element.- Returns:
- the builder for the new element
-
startCheckboxInput
public InputBuilder startCheckboxInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='check'> element.- Returns:
- the builder for the new element
-
startCol
public TableColBuilder startCol()
Description copied from interface:ElementBuilderBaseAppend a tablecol element.- Returns:
- the builder for the new element
-
startColGroup
public TableColBuilder startColGroup()
Description copied from interface:ElementBuilderBaseAppend a tablecol element.- Returns:
- the builder for the new element
-
startDiv
public DivBuilder startDiv()
Description copied from interface:ElementBuilderBaseAppend a div element.- Returns:
- the builder for the new element
-
startDList
public DListBuilder startDList()
Description copied from interface:ElementBuilderBaseAppend a dlist element.- Returns:
- the builder for the new element
-
startFieldSet
public FieldSetBuilder startFieldSet()
Description copied from interface:ElementBuilderBaseAppend a fieldset element.- Returns:
- the builder for the new element
-
startFileInput
public InputBuilder startFileInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='file'> element.- Returns:
- the builder for the new element
-
startForm
public FormBuilder startForm()
Description copied from interface:ElementBuilderBaseAppend a form element.- Returns:
- the builder for the new element
-
startFrame
public FrameBuilder startFrame()
Description copied from interface:ElementBuilderBaseAppend a frame element.- Returns:
- the builder for the new element
-
startFrameSet
public FrameSetBuilder startFrameSet()
Description copied from interface:ElementBuilderBaseAppend a frameset element.- Returns:
- the builder for the new element
-
startH1
public HeadingBuilder startH1()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startH2
public HeadingBuilder startH2()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startH3
public HeadingBuilder startH3()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startH4
public HeadingBuilder startH4()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startH5
public HeadingBuilder startH5()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startH6
public HeadingBuilder startH6()
Description copied from interface:ElementBuilderBaseAppend a heading element.- Returns:
- the builder for the new element
-
startHead
public HeadBuilder startHead()
Description copied from interface:ElementBuilderBaseAppend a head element.- Returns:
- the builder for the new element
-
startHiddenInput
public InputBuilder startHiddenInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='hidden'> element.- Returns:
- the builder for the new element
-
startHR
public HRBuilder startHR()
Description copied from interface:ElementBuilderBaseAppend a hr element.- Returns:
- the builder for the new element
-
startIFrame
public IFrameBuilder startIFrame()
Description copied from interface:ElementBuilderBaseAppend a iframe element.- Returns:
- the builder for the new element
-
startImage
public ImageBuilder startImage()
Description copied from interface:ElementBuilderBaseAppend a image element.- Returns:
- the builder for the new element
-
startImageInput
public InputBuilder startImageInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='image'> element.- Returns:
- the builder for the new element
-
startLabel
public LabelBuilder startLabel()
Description copied from interface:ElementBuilderBaseAppend a label element.- Returns:
- the builder for the new element
-
startLegend
public LegendBuilder startLegend()
Description copied from interface:ElementBuilderBaseAppend a legend element.- Returns:
- the builder for the new element
-
startLI
public LIBuilder startLI()
Description copied from interface:ElementBuilderBaseAppend a li element.- Returns:
- the builder for the new element
-
startLink
public LinkBuilder startLink()
Description copied from interface:ElementBuilderBaseAppend a link element.- Returns:
- the builder for the new element
-
startMap
public MapBuilder startMap()
Description copied from interface:ElementBuilderBaseAppend a map element.- Returns:
- the builder for the new element
-
startMeta
public MetaBuilder startMeta()
Description copied from interface:ElementBuilderBaseAppend a meta element.- Returns:
- the builder for the new element
-
startOList
public OListBuilder startOList()
Description copied from interface:ElementBuilderBaseAppend a olist element.- Returns:
- the builder for the new element
-
startOptGroup
public OptGroupBuilder startOptGroup()
Description copied from interface:ElementBuilderBaseAppend a optgroup element.- Returns:
- the builder for the new element
-
startOption
public OptionBuilder startOption()
Description copied from interface:ElementBuilderBaseAppend an option element.- Returns:
- the builder for the new element
-
startParagraph
public ParagraphBuilder startParagraph()
Description copied from interface:ElementBuilderBaseAppend a paragraph element.- Returns:
- the builder for the new element
-
startParam
public ParamBuilder startParam()
Description copied from interface:ElementBuilderBaseAppend a param element.- Returns:
- the builder for the new element
-
startPasswordInput
public InputBuilder startPasswordInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='password'> element.- Returns:
- the builder for the new element
-
startPre
public PreBuilder startPre()
Description copied from interface:ElementBuilderBaseAppend a pre element.- Returns:
- the builder for the new element
-
startPushButton
public ButtonBuilder startPushButton()
Description copied from interface:ElementBuilderBaseAppend a button element with type "button".- Returns:
- the builder for the new element
-
startQuote
public QuoteBuilder startQuote()
Description copied from interface:ElementBuilderBaseAppend a quote element.- Returns:
- the builder for the new element
-
startRadioInput
public InputBuilder startRadioInput(java.lang.String name)
Description copied from interface:ElementBuilderBaseAppend 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
public ButtonBuilder startResetButton()
Description copied from interface:ElementBuilderBaseAppend a button element with type "reset".- Returns:
- the builder for the new element
-
startResetInput
public InputBuilder startResetInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='reset'> element.- Returns:
- the builder for the new element
-
startScript
public ScriptBuilder startScript()
Description copied from interface:ElementBuilderBaseAppend a script element.- Returns:
- the builder for the new element
-
startSelect
public SelectBuilder startSelect()
Description copied from interface:ElementBuilderBaseAppend a select element.- Returns:
- the builder for the new element
-
startSource
public SourceBuilder startSource()
Description copied from interface:ElementBuilderBaseAppend a source element.- Returns:
- the builder for the new element
-
startSpan
public SpanBuilder startSpan()
Description copied from interface:ElementBuilderBaseAppend a span element.- Returns:
- the builder for the new element
-
startStyle
public StyleBuilder startStyle()
Description copied from interface:ElementBuilderBaseAppend a style element.- Returns:
- the builder for the new element
-
startSubmitButton
public ButtonBuilder startSubmitButton()
Description copied from interface:ElementBuilderBaseAppend a button element with type "submit".- Returns:
- the builder for the new element
-
startSubmitInput
public InputBuilder startSubmitInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='submit'> element.- Returns:
- the builder for the new element
-
startTable
public TableBuilder startTable()
Description copied from interface:ElementBuilderBaseAppend a table element.- Returns:
- the builder for the new element
-
startTableCaption
public TableCaptionBuilder startTableCaption()
Description copied from interface:ElementBuilderBaseAppend a table caption element.- Returns:
- the builder for the new element
-
startTBody
public TableSectionBuilder startTBody()
Description copied from interface:ElementBuilderBaseAppend a tbody element.- Returns:
- the builder for the new element
-
startTD
public TableCellBuilder startTD()
Description copied from interface:ElementBuilderBaseAppend a td element.- Returns:
- the builder for the new element
-
startTextArea
public TextAreaBuilder startTextArea()
Description copied from interface:ElementBuilderBaseAppend a textarea element.- Returns:
- the builder for the new element
-
startTextInput
public InputBuilder startTextInput()
Description copied from interface:ElementBuilderBaseAppend an <input type='text'> element.- Returns:
- the builder for the new element
-
startTFoot
public TableSectionBuilder startTFoot()
Description copied from interface:ElementBuilderBaseAppend a tfoot element.- Returns:
- the builder for the new element
-
startTH
public TableCellBuilder startTH()
Description copied from interface:ElementBuilderBaseAppend a th element.- Returns:
- the builder for the new element
-
startTHead
public TableSectionBuilder startTHead()
Description copied from interface:ElementBuilderBaseAppend a thead element.- Returns:
- the builder for the new element
-
startTitle
public TitleBuilder startTitle()
Append a title element.- Returns:
- the builder for the new element
-
startTR
public TableRowBuilder startTR()
Description copied from interface:ElementBuilderBaseAppend a tablerow element.- Returns:
- the builder for the new element
-
startUList
public UListBuilder startUList()
Description copied from interface:ElementBuilderBaseAppend a ulist element.- Returns:
- the builder for the new element
-
startVideo
public VideoBuilder startVideo()
Description copied from interface:ElementBuilderBaseAppend a video element.- Returns:
- the builder for the new element
-
tabIndex
public R tabIndex(int tabIndex)
Description copied from interface:ElementBuilderBaseSet the tab index.- Parameters:
tabIndex- the tab index- Returns:
- this builder
-
title
public R title(java.lang.String title)
Description copied from interface:ElementBuilderBaseThe element's advisory title.- Returns:
- this builder
-
trustedStart
public ElementBuilder trustedStart(java.lang.String tagName)
Description copied from interface:ElementBuilderBaseAppend 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
ElementBuilderfor the new element
-
trustedAttribute
R trustedAttribute(java.lang.String name, int value)
Add an attribute with a trusted name.
-
trustedAttribute
R trustedAttribute(java.lang.String name, java.lang.String value)
Add an attribute with a trusted name. The name is still escaped.
-
-