T
- the builder type returns from build methodspublic interface ElementBuilderBase<T extends ElementBuilderBase<?>>
Modifier and Type | Method and Description |
---|---|
T |
attribute(String name,
int value)
Add an integer attribute to the object.
|
T |
attribute(String name,
String value)
Add a string attribute to the object.
|
T |
className(String className)
The class attribute of the element.
|
T |
dir(String dir)
Specifies the base direction of directionally neutral text and the
directionality of tables.
|
T |
draggable(String draggable)
Changes the draggable attribute to one of
Element.DRAGGABLE_AUTO ,
Element.DRAGGABLE_FALSE , or Element.DRAGGABLE_TRUE . |
void |
end()
End the current element without checking its type.
|
void |
end(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.
|
T |
html(SafeHtml html)
Append html within the node.
|
T |
id(String id)
Set the id.
|
boolean |
isChildElementSupported()
Check if child elements are supported.
|
boolean |
isEndTagForbidden()
Check if an end tag is forbidden for this element.
|
T |
lang(String lang)
Language code defined in RFC 1766.
|
AnchorBuilder |
startAnchor()
Append a anchor element.
|
AreaBuilder |
startArea()
Append a area element.
|
AudioBuilder |
startAudio()
Append a audio element.
|
BaseBuilder |
startBase()
Append a base element.
|
QuoteBuilder |
startBlockQuote()
Append a block quote element.
|
BodyBuilder |
startBody()
Append a body element.
|
BRBuilder |
startBR()
Append a br element.
|
InputBuilder |
startButtonInput()
Append an <input type='button'> element.
|
CanvasBuilder |
startCanvas()
Append a canvas element.
|
InputBuilder |
startCheckboxInput()
Append an <input type='check'> element.
|
TableColBuilder |
startCol()
Append a tablecol element.
|
TableColBuilder |
startColGroup()
Append a tablecol element.
|
DivBuilder |
startDiv()
Append a div element.
|
DListBuilder |
startDList()
Append a dlist element.
|
FieldSetBuilder |
startFieldSet()
Append a fieldset element.
|
InputBuilder |
startFileInput()
Append an <input type='file'> element.
|
FormBuilder |
startForm()
Append a form element.
|
FrameBuilder |
startFrame()
Append a frame element.
|
FrameSetBuilder |
startFrameSet()
Append a frameset element.
|
HeadingBuilder |
startH1()
Append a heading element.
|
HeadingBuilder |
startH2()
Append a heading element.
|
HeadingBuilder |
startH3()
Append a heading element.
|
HeadingBuilder |
startH4()
Append a heading element.
|
HeadingBuilder |
startH5()
Append a heading element.
|
HeadingBuilder |
startH6()
Append a heading element.
|
HeadBuilder |
startHead()
Append a head element.
|
InputBuilder |
startHiddenInput()
Append an <input type='hidden'> element.
|
HRBuilder |
startHR()
Append a hr element.
|
IFrameBuilder |
startIFrame()
Append a iframe element.
|
ImageBuilder |
startImage()
Append a image element.
|
InputBuilder |
startImageInput()
Append an <input type='image'> element.
|
LabelBuilder |
startLabel()
Append a label element.
|
LegendBuilder |
startLegend()
Append a legend element.
|
LIBuilder |
startLI()
Append a li element.
|
LinkBuilder |
startLink()
Append a link element.
|
MapBuilder |
startMap()
Append a map element.
|
MetaBuilder |
startMeta()
Append a meta element.
|
OListBuilder |
startOList()
Append a olist element.
|
OptGroupBuilder |
startOptGroup()
Append a optgroup element.
|
OptionBuilder |
startOption()
Append an option element.
|
ParagraphBuilder |
startParagraph()
Append a paragraph element.
|
ParamBuilder |
startParam()
Append a param element.
|
InputBuilder |
startPasswordInput()
Append an <input type='password'> element.
|
PreBuilder |
startPre()
Append a pre element.
|
ButtonBuilder |
startPushButton()
Append a button element with type "button".
|
QuoteBuilder |
startQuote()
Append a quote element.
|
InputBuilder |
startRadioInput(String name)
Append an <input type='radio'> element.
|
ButtonBuilder |
startResetButton()
Append a button element with type "reset".
|
InputBuilder |
startResetInput()
Append an <input type='reset'> element.
|
ScriptBuilder |
startScript()
Append a script element.
|
SelectBuilder |
startSelect()
Append a select element.
|
SourceBuilder |
startSource()
Append a source element.
|
SpanBuilder |
startSpan()
Append a span element.
|
StyleBuilder |
startStyle()
Append a style element.
|
ButtonBuilder |
startSubmitButton()
Append a button element with type "submit".
|
InputBuilder |
startSubmitInput()
Append an <input type='submit'> element.
|
TableBuilder |
startTable()
Append a table element.
|
TableCaptionBuilder |
startTableCaption()
Append a table caption element.
|
TableSectionBuilder |
startTBody()
Append a tbody element.
|
TableCellBuilder |
startTD()
Append a td element.
|
TextAreaBuilder |
startTextArea()
Append a textarea element.
|
InputBuilder |
startTextInput()
Append an <input type='text'> element.
|
TableSectionBuilder |
startTFoot()
Append a tfoot element.
|
TableCellBuilder |
startTH()
Append a th element.
|
TableSectionBuilder |
startTHead()
Append a thead element.
|
TableRowBuilder |
startTR()
Append a tablerow element.
|
UListBuilder |
startUList()
Append a ulist element.
|
VideoBuilder |
startVideo()
Append a video element.
|
StylesBuilder |
style()
Start the
StylesBuilder used to add style properties to the style
attribute of the current element. |
T |
tabIndex(int tabIndex)
Set the tab index.
|
T |
text(String text)
Append text within the node.
|
T |
title(String title)
The element's advisory title.
|
ElementBuilder |
trustedStart(String tagName)
Append a new element with the specified trusted tag name.
|
T attribute(String name, int value)
T attribute(String name, String value)
T className(String className)
T dir(String dir)
T draggable(String draggable)
Element.DRAGGABLE_AUTO
,
Element.DRAGGABLE_FALSE
, or Element.DRAGGABLE_TRUE
.draggable
- a String constantvoid end()
void end(String tagName)
tagName
- the expected tagName of the current elementend()
void endAnchor()
IllegalStateException
- if the current element has the wrong tagend()
void endArea()
IllegalStateException
- if the current element has the wrong tagend()
void endAudio()
IllegalStateException
- if the current element has the wrong tagend()
void endBase()
IllegalStateException
- if the current element has the wrong tagend()
void endBlockQuote()
IllegalStateException
- if the current element has the wrong tagend()
void endBody()
IllegalStateException
- if the current element has the wrong tagend()
void endBR()
IllegalStateException
- if the current element has the wrong tagend()
void endButton()
IllegalStateException
- if the current element has the wrong tagend()
void endCanvas()
IllegalStateException
- if the current element has the wrong tagend()
void endCol()
IllegalStateException
- if the current element has the wrong tagend()
void endColGroup()
IllegalStateException
- if the current element has the wrong tagend()
void endDiv()
IllegalStateException
- if the current element has the wrong tagend()
void endDList()
IllegalStateException
- if the current element has the wrong tagend()
void endFieldSet()
IllegalStateException
- if the current element has the wrong tagend()
void endForm()
IllegalStateException
- if the current element has the wrong tagend()
void endFrame()
IllegalStateException
- if the current element has the wrong tagend()
void endFrameSet()
IllegalStateException
- if the current element has the wrong tagend()
void endH1()
IllegalStateException
- if the current element has the wrong tagend()
void endH2()
IllegalStateException
- if the current element has the wrong tagend()
void endH3()
IllegalStateException
- if the current element has the wrong tagend()
void endH4()
IllegalStateException
- if the current element has the wrong tagend()
void endH5()
IllegalStateException
- if the current element has the wrong tagend()
void endH6()
IllegalStateException
- if the current element has the wrong tagend()
void endHead()
IllegalStateException
- if the current element has the wrong tagend()
void endHR()
IllegalStateException
- if the current element has the wrong tagend()
void endIFrame()
IllegalStateException
- if the current element has the wrong tagend()
void endImage()
IllegalStateException
- if the current element has the wrong tagend()
void endInput()
IllegalStateException
- if the current element has the wrong tagend()
void endLabel()
IllegalStateException
- if the current element has the wrong tagend()
void endLegend()
IllegalStateException
- if the current element has the wrong tagend()
void endLI()
IllegalStateException
- if the current element has the wrong tagend()
void endLink()
IllegalStateException
- if the current element has the wrong tagend()
void endMap()
IllegalStateException
- if the current element has the wrong tagend()
void endMeta()
IllegalStateException
- if the current element has the wrong tagend()
void endOList()
IllegalStateException
- if the current element has the wrong tagend()
void endOptGroup()
IllegalStateException
- if the current element has the wrong tagend()
void endOption()
IllegalStateException
- if the current element has the wrong tagend()
void endParagraph()
IllegalStateException
- if the current element has the wrong tagend()
void endParam()
IllegalStateException
- if the current element has the wrong tagend()
void endPre()
IllegalStateException
- if the current element has the wrong tagend()
void endQuote()
IllegalStateException
- if the current element has the wrong tagend()
void endScript()
IllegalStateException
- if the current element has the wrong tagend()
void endSelect()
IllegalStateException
- if the current element has the wrong tagend()
void endSource()
IllegalStateException
- if the current element has the wrong tagend()
void endSpan()
IllegalStateException
- if the current element has the wrong tagend()
void endStyle()
IllegalStateException
- if the current element has the wrong tagend()
void endTable()
IllegalStateException
- if the current element has the wrong tagend()
void endTableCaption()
IllegalStateException
- if the current element has the wrong tagend()
void endTBody()
IllegalStateException
- if the current element has the wrong tagend()
void endTD()
IllegalStateException
- if the current element has the wrong tagend()
void endTextArea()
IllegalStateException
- if the current element has the wrong tagend()
void endTFoot()
IllegalStateException
- if the current element has the wrong tagend()
void endTH()
IllegalStateException
- if the current element has the wrong tagend()
void endTHead()
IllegalStateException
- if the current element has the wrong tagend()
void endTR()
IllegalStateException
- if the current element has the wrong tagend()
void endUList()
IllegalStateException
- if the current element has the wrong tagend()
void endVideo()
IllegalStateException
- if the current element has the wrong tagend()
Element finish()
Element
.
Any lingering open elements are automatically closed. Once you call
finish()
, you can not longer call any other methods in this class.
Element
that was builtIllegalStateException
- if called twiceint getDepth()
T html(SafeHtml html)
Once you append HTML to the element, you can no longer set attributes.
html
- the HTML to appendboolean isChildElementSupported()
boolean isEndTagForbidden()
UnsupportedOperationException
.AnchorBuilder startAnchor()
AreaBuilder startArea()
AudioBuilder startAudio()
BaseBuilder startBase()
QuoteBuilder startBlockQuote()
BodyBuilder startBody()
BRBuilder startBR()
InputBuilder startButtonInput()
CanvasBuilder startCanvas()
InputBuilder startCheckboxInput()
TableColBuilder startCol()
TableColBuilder startColGroup()
DivBuilder startDiv()
DListBuilder startDList()
FieldSetBuilder startFieldSet()
InputBuilder startFileInput()
FormBuilder startForm()
FrameBuilder startFrame()
FrameSetBuilder startFrameSet()
HeadingBuilder startH1()
HeadingBuilder startH2()
HeadingBuilder startH3()
HeadingBuilder startH4()
HeadingBuilder startH5()
HeadingBuilder startH6()
HeadBuilder startHead()
InputBuilder startHiddenInput()
HRBuilder startHR()
IFrameBuilder startIFrame()
ImageBuilder startImage()
InputBuilder startImageInput()
LabelBuilder startLabel()
LegendBuilder startLegend()
LIBuilder startLI()
LinkBuilder startLink()
MapBuilder startMap()
MetaBuilder startMeta()
OListBuilder startOList()
OptGroupBuilder startOptGroup()
OptionBuilder startOption()
ParagraphBuilder startParagraph()
ParamBuilder startParam()
InputBuilder startPasswordInput()
PreBuilder startPre()
ButtonBuilder startPushButton()
QuoteBuilder startQuote()
InputBuilder startRadioInput(String name)
name
- name the name of the radio input (used for grouping)ButtonBuilder startResetButton()
InputBuilder startResetInput()
ScriptBuilder startScript()
SelectBuilder startSelect()
SourceBuilder startSource()
SpanBuilder startSpan()
StyleBuilder startStyle()
ButtonBuilder startSubmitButton()
InputBuilder startSubmitInput()
TableBuilder startTable()
TableCaptionBuilder startTableCaption()
TableSectionBuilder startTBody()
TableCellBuilder startTD()
TextAreaBuilder startTextArea()
InputBuilder startTextInput()
TableSectionBuilder startTFoot()
TableCellBuilder startTH()
TableSectionBuilder startTHead()
TableRowBuilder startTR()
UListBuilder startUList()
VideoBuilder startVideo()
StylesBuilder style()
StylesBuilder
used to add style properties to the style
attribute of the current element.StylesBuilder
T tabIndex(int tabIndex)
tabIndex
- the tab indexT text(String text)
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.
text
- the text to appendElementBuilder trustedStart(String tagName)
tagName
- the tag nameElementBuilder
for the new elementCopyright © 2018. All rights reserved.