public class HtmlTagRenderer extends Object implements INodeVisitor
| Modifier | Constructor and Description |
|---|---|
protected |
HtmlTagRenderer(BrowserVersion bv,
IBrowserOutput o,
boolean uiTestMode) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDelayedAttrs(NodeBase n,
String... pairs)
For browsers that have trouble with attribute updates (Microsoft's sinking flagship of course) this
can be used to postphone setting node attributes until after the delta has been applied to the DOM; it
executes attribute updates using Javascript at the end of a delta update.
|
void |
appendStyle(NodeBase c,
Appendable a) |
void |
basicNodeRender(NodeBase b,
IBrowserOutput o) |
void |
basicNodeRender(NodeBase b,
IBrowserOutput o,
boolean inhibitevents)
Basic rendering of a node.
|
static String |
fixColor(String s) |
protected BrowserVersion |
getBrowser() |
HtmlRenderMode |
getMode() |
protected String |
getStyleFor(NodeBase b)
Returns the style for the node.
|
protected boolean |
isFullRender() |
boolean |
isTagless()
When T this only renders attributes but no tags and tag-ends.
|
protected IBrowserOutput |
o() |
protected void |
renderChecked(NodeBase n,
boolean checked)
Render the "checked" attribute.
|
protected void |
renderDiRo(NodeBase n,
boolean disabled,
boolean readonly) |
protected void |
renderDisabled(NodeBase n,
boolean disabled)
Render the "disabled" attribute.
|
void |
renderEndTag(NodeBase b) |
protected void |
renderReadOnly(NodeBase n,
boolean readonly)
Render the 'readonly' attribute.
|
protected void |
renderSelected(NodeBase n,
boolean checked)
Render the 'selected' attribute.
|
protected void |
renderTag(NodeBase b,
IBrowserOutput o) |
protected void |
renderTagend(NodeBase b,
IBrowserOutput o) |
protected StringBuilder |
sb()
Return the cleared scratchbuffer.
|
void |
setRenderMode(HtmlRenderMode rm) |
void |
setTagless(boolean tagless)
When T this only renders attributes but no tags and tag-ends.
|
void |
visitA(ATag a) |
void |
visitBR(BR n) |
void |
visitButton(Button n) |
void |
visitCheckbox(Checkbox n)
Render the basic input tag.
|
void |
visitDiv(Div n)
Special thingy; this can actually be a BODY instead of a DIV; in that case we render some extra
arguments...
|
void |
visitFileInput(FileInput n) |
void |
visitForm(Form n) |
void |
visitH(HTag n) |
void |
visitIFrame(IFrame n) |
void |
visitImg(Img n) |
void |
visitInput(Input n)
Render the basic input tag.
|
void |
visitLabel(Label n) |
void |
visitLi(Li n) |
void |
visitLiteralXhtml(LiteralXhtml n)
Deprecated.
|
void |
visitOption(SelectOption n) |
void |
visitPre(Pre n) |
void |
visitRadioButton(RadioButton<?> n)
Render the basic radio button
|
void |
visitSelect(Select n) |
void |
visitSpan(Span n) |
void |
visitTable(Table n) |
void |
visitTBody(TBody n) |
void |
visitTD(TD n) |
void |
visitTextArea(TextArea n)
FIXME This now contains IE code where browser-standard code would just generate a proper TextArea with a content block.
|
void |
visitTextNode(TextNode n) |
void |
visitTH(TH n) |
void |
visitTHead(THead n) |
void |
visitTR(TR n) |
void |
visitUl(Ul n) |
void |
visitUnderline(Underline n) |
void |
visitXmlNode(XmlTextNode n)
This is a TextNode with the special characteristic that it contains
not normal text but XML to be rendered verbatim.
|
protected HtmlTagRenderer(BrowserVersion bv, IBrowserOutput o, boolean uiTestMode)
protected BrowserVersion getBrowser()
public boolean isTagless()
public void setTagless(boolean tagless)
public void setRenderMode(HtmlRenderMode rm)
public HtmlRenderMode getMode()
protected boolean isFullRender()
protected StringBuilder sb()
protected void addDelayedAttrs(NodeBase n, String... pairs)
nodeID - pairs - protected void renderDisabled(NodeBase n, boolean disabled) throws IOException
n - disabled - IOExceptionprotected void renderChecked(NodeBase n, boolean checked) throws IOException
n - checked - IOExceptionprotected void renderSelected(NodeBase n, boolean checked) throws IOException
n - checked - IOExceptionprotected void renderReadOnly(NodeBase n, boolean readonly) throws IOException
n - readonly - IOExceptionprotected void renderDiRo(NodeBase n, boolean disabled, boolean readonly) throws IOException
IOExceptionpublic void appendStyle(NodeBase c, Appendable a) throws IOException
IOExceptionprotected final IBrowserOutput o()
protected String getStyleFor(NodeBase b) throws IOException
b - IOExceptionprotected void renderTag(NodeBase b, IBrowserOutput o) throws Exception
Exceptionprotected void renderTagend(NodeBase b, IBrowserOutput o) throws Exception
Exceptionpublic void basicNodeRender(NodeBase b, IBrowserOutput o) throws Exception
Exceptionpublic void basicNodeRender(NodeBase b, IBrowserOutput o, boolean inhibitevents) throws Exception
o - Exceptionpublic void visitDiv(Div n) throws Exception
visitDiv in interface INodeVisitorExceptionINodeVisitor.visitDiv(to.etc.domui.dom.html.Div)public void visitSpan(Span n) throws Exception
visitSpan in interface INodeVisitorExceptionpublic void visitUnderline(Underline n) throws Exception
visitUnderline in interface INodeVisitorExceptionpublic void visitTable(Table n) throws Exception
visitTable in interface INodeVisitorExceptionpublic void visitTHead(THead n) throws Exception
visitTHead in interface INodeVisitorExceptionpublic void visitTBody(TBody n) throws Exception
visitTBody in interface INodeVisitorExceptionpublic void visitTD(TD n) throws Exception
visitTD in interface INodeVisitorExceptionpublic void visitTH(TH n) throws Exception
visitTH in interface INodeVisitorExceptionpublic void visitTR(TR n) throws Exception
visitTR in interface INodeVisitorExceptionpublic void visitTextNode(TextNode n) throws Exception
visitTextNode in interface INodeVisitorExceptionpublic void visitXmlNode(XmlTextNode n) throws Exception
visitXmlNode in interface INodeVisitorExceptionINodeVisitor.visitXmlNode(to.etc.domui.dom.html.XmlTextNode)public void renderEndTag(NodeBase b) throws IOException
IOExceptionpublic void visitA(ATag a) throws Exception
visitA in interface INodeVisitorExceptionpublic void visitLi(Li n) throws Exception
visitLi in interface INodeVisitorExceptionpublic void visitUl(Ul n) throws Exception
visitUl in interface INodeVisitorExceptionpublic void visitInput(Input n) throws Exception
visitInput in interface INodeVisitorExceptionINodeVisitor.visitInput(to.etc.domui.dom.html.Input)public void visitFileInput(FileInput n) throws Exception
visitFileInput in interface INodeVisitorExceptionpublic void visitCheckbox(Checkbox n) throws Exception
visitCheckbox in interface INodeVisitorExceptionINodeVisitor.visitInput(to.etc.domui.dom.html.Input)public void visitRadioButton(RadioButton<?> n) throws Exception
visitRadioButton in interface INodeVisitorExceptionINodeVisitor.visitInput(to.etc.domui.dom.html.Input)public void visitImg(Img n) throws Exception
visitImg in interface INodeVisitorExceptionpublic void visitButton(Button n) throws Exception
visitButton in interface INodeVisitorExceptionpublic void visitPre(Pre n) throws Exception
visitPre in interface INodeVisitorExceptionpublic void visitLabel(Label n) throws Exception
visitLabel in interface INodeVisitorExceptionpublic void visitSelect(Select n) throws Exception
visitSelect in interface INodeVisitorExceptionpublic void visitOption(SelectOption n) throws Exception
visitOption in interface INodeVisitorExceptionpublic void visitBR(BR n) throws Exception
visitBR in interface INodeVisitorExceptionpublic void visitTextArea(TextArea n) throws Exception
visitTextArea in interface INodeVisitorExceptionINodeVisitor.visitTextArea(to.etc.domui.dom.html.TextArea)public void visitForm(Form n) throws Exception
visitForm in interface INodeVisitorException@Deprecated public void visitLiteralXhtml(LiteralXhtml n) throws Exception
visitLiteralXhtml in interface INodeVisitorExceptionpublic void visitH(HTag n) throws Exception
visitH in interface INodeVisitorExceptionpublic void visitIFrame(IFrame n) throws Exception
visitIFrame in interface INodeVisitorExceptionCopyright © 2017 etc.to. All rights reserved.