|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.dom.builder.shared.ElementBuilderImpl
public abstract class ElementBuilderImpl
Base implementation of ElementBuilderBase
that handles state, but
nothing else.
DO NOT USE THIS CLASS. This class is an implementation class and may change in the future.
This class is used to ensure that the HTML and DOM implementations throw the same exceptions, even if something is valid in one and not the other. For example, the DOM implementation supports changing an attribute after setting inner HTML, but the HTML version does not, so they should both throw an error. Otherwise, they would not be swappable.
Constructor Summary | |
---|---|
ElementBuilderImpl()
|
Method Summary | |
---|---|
protected void |
assertCanAddAttributeImpl()
Assert that the builder is in a state where an attribute can be added. |
protected void |
assertCanAddStylePropertyImpl()
Assert that a style property can be added, and setup the state as if one is about to be added. |
protected void |
assertValidTagName(java.lang.String tagName)
Assert that the specified tag name is valid. |
protected abstract void |
doCloseStartTagImpl()
Close the start tag. |
protected abstract void |
doCloseStyleAttributeImpl()
Close the style attribute. |
protected abstract void |
doEndStartTagImpl()
Self-close the start tag. |
protected abstract void |
doEndTagImpl(java.lang.String tagName)
End the specified tag. |
protected abstract Element |
doFinishImpl()
Return the build element. |
protected abstract void |
doHtmlImpl(SafeHtml html)
Set the specified html as the inner HTML of the current element. |
protected abstract void |
doOpenStyleImpl()
Open the style attribute. |
protected abstract void |
doTextImpl(java.lang.String text)
Set the specified text as the inner text of the current element. |
void |
end()
|
void |
end(java.lang.String tagName)
|
protected void |
endAllTags()
End all open tags, including the root element. |
void |
endStyle()
|
Element |
finish()
Return the built DOM as an Element . |
int |
getDepth()
|
void |
html(SafeHtml html)
|
protected void |
lockCurrentElement()
Lock the current element, preventing any additional changes to it. |
void |
onStart(java.lang.String tagName,
ElementBuilderBase<?> builder)
|
abstract StylesBuilder |
style()
Get the StylesBuilder used to add style properties to the current
element. |
void |
text(java.lang.String text)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElementBuilderImpl()
Method Detail |
---|
public void end()
public void end(java.lang.String tagName)
public void endStyle()
public Element finish()
Element
.
Element
that was builtpublic int getDepth()
public void html(SafeHtml html)
public void onStart(java.lang.String tagName, ElementBuilderBase<?> builder)
public abstract StylesBuilder style()
StylesBuilder
used to add style properties to the current
element.
StylesBuilder
public void text(java.lang.String text)
protected void assertCanAddAttributeImpl()
protected void assertCanAddStylePropertyImpl()
protected void assertValidTagName(java.lang.String tagName)
java.lang.IllegalArgumentException
- if not validprotected abstract void doCloseStartTagImpl()
protected abstract void doCloseStyleAttributeImpl()
protected abstract void doEndStartTagImpl()
protected abstract void doEndTagImpl(java.lang.String tagName)
tagName
- the name of the tag to endprotected abstract Element doFinishImpl()
protected abstract void doHtmlImpl(SafeHtml html)
html
- the HTML to setprotected abstract void doOpenStyleImpl()
protected abstract void doTextImpl(java.lang.String text)
text
- the text to setprotected void endAllTags()
Doing so also ensures that all builder methods will throw an exception because the stack is empty, and a new element cannot be started.
protected void lockCurrentElement()
end()
.
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |