|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.HtmlTagRenderer
public class HtmlTagRenderer
Basic, mostly standard-compliant handler for rendering HTML tags.
Constructor Summary | |
---|---|
protected |
HtmlTagRenderer(BrowserVersion bv,
IBrowserOutput o)
|
Method Summary | |
---|---|
protected void |
addDelayedAttrs(NodeBase n,
java.lang.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(CssBase c,
java.lang.Appendable a)
|
void |
basicNodeRender(NodeBase b,
IBrowserOutput o)
|
void |
basicNodeRender(NodeBase b,
IBrowserOutput o,
boolean inhibitevents)
Basic rendering of a node. |
static java.lang.String |
fixColor(java.lang.String s)
|
protected BrowserVersion |
getBrowser()
|
HtmlRenderMode |
getMode()
|
protected java.lang.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 java.lang.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 |
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 |
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 |
visitXmlNode(XmlTextNode n)
This is a TextNode with the special characteristic that it contains not normal text but XML to be rendered verbatim. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected HtmlTagRenderer(BrowserVersion bv, IBrowserOutput o)
Method Detail |
---|
protected BrowserVersion getBrowser()
public boolean isTagless()
public void setTagless(boolean tagless)
public void setRenderMode(HtmlRenderMode rm)
public HtmlRenderMode getMode()
protected boolean isFullRender()
protected java.lang.StringBuilder sb()
protected void addDelayedAttrs(NodeBase n, java.lang.String... pairs)
nodeID
- pairs
- protected void renderDisabled(NodeBase n, boolean disabled) throws java.io.IOException
n
- disabled
-
java.io.IOException
protected void renderChecked(NodeBase n, boolean checked) throws java.io.IOException
n
- checked
-
java.io.IOException
protected void renderSelected(NodeBase n, boolean checked) throws java.io.IOException
n
- checked
-
java.io.IOException
protected void renderReadOnly(NodeBase n, boolean readonly) throws java.io.IOException
n
- readonly
-
java.io.IOException
protected void renderDiRo(NodeBase n, boolean disabled, boolean readonly) throws java.io.IOException
java.io.IOException
public static java.lang.String fixColor(java.lang.String s)
public void appendStyle(CssBase c, java.lang.Appendable a) throws java.io.IOException
java.io.IOException
protected final IBrowserOutput o()
protected java.lang.String getStyleFor(NodeBase b) throws java.io.IOException
b
-
java.io.IOException
protected void renderTag(NodeBase b, IBrowserOutput o) throws java.lang.Exception
java.lang.Exception
protected void renderTagend(NodeBase b, IBrowserOutput o) throws java.lang.Exception
java.lang.Exception
public void basicNodeRender(NodeBase b, IBrowserOutput o) throws java.lang.Exception
java.lang.Exception
public void basicNodeRender(NodeBase b, IBrowserOutput o, boolean inhibitevents) throws java.lang.Exception
o
-
java.lang.Exception
public void visitDiv(Div n) throws java.lang.Exception
visitDiv
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitDiv(to.etc.domui.dom.html.Div)
public void visitSpan(Span n) throws java.lang.Exception
visitSpan
in interface INodeVisitor
java.lang.Exception
public void visitTable(Table n) throws java.lang.Exception
visitTable
in interface INodeVisitor
java.lang.Exception
public void visitTHead(THead n) throws java.lang.Exception
visitTHead
in interface INodeVisitor
java.lang.Exception
public void visitTBody(TBody n) throws java.lang.Exception
visitTBody
in interface INodeVisitor
java.lang.Exception
public void visitTD(TD n) throws java.lang.Exception
visitTD
in interface INodeVisitor
java.lang.Exception
public void visitTH(TH n) throws java.lang.Exception
visitTH
in interface INodeVisitor
java.lang.Exception
public void visitTR(TR n) throws java.lang.Exception
visitTR
in interface INodeVisitor
java.lang.Exception
public void visitTextNode(TextNode n) throws java.lang.Exception
visitTextNode
in interface INodeVisitor
java.lang.Exception
public void visitXmlNode(XmlTextNode n) throws java.lang.Exception
visitXmlNode
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitXmlNode(to.etc.domui.dom.html.XmlTextNode)
public void renderEndTag(NodeBase b) throws java.io.IOException
java.io.IOException
public void visitA(ATag a) throws java.lang.Exception
visitA
in interface INodeVisitor
java.lang.Exception
public void visitLi(Li n) throws java.lang.Exception
visitLi
in interface INodeVisitor
java.lang.Exception
public void visitUl(Ul n) throws java.lang.Exception
visitUl
in interface INodeVisitor
java.lang.Exception
public void visitInput(Input n) throws java.lang.Exception
visitInput
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitInput(to.etc.domui.dom.html.Input)
public void visitFileInput(FileInput n) throws java.lang.Exception
visitFileInput
in interface INodeVisitor
java.lang.Exception
public void visitCheckbox(Checkbox n) throws java.lang.Exception
visitCheckbox
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitInput(to.etc.domui.dom.html.Input)
public void visitRadioButton(RadioButton<?> n) throws java.lang.Exception
visitRadioButton
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitInput(to.etc.domui.dom.html.Input)
public void visitImg(Img n) throws java.lang.Exception
visitImg
in interface INodeVisitor
java.lang.Exception
public void visitButton(Button n) throws java.lang.Exception
visitButton
in interface INodeVisitor
java.lang.Exception
public void visitLabel(Label n) throws java.lang.Exception
visitLabel
in interface INodeVisitor
java.lang.Exception
public void visitSelect(Select n) throws java.lang.Exception
visitSelect
in interface INodeVisitor
java.lang.Exception
public void visitOption(SelectOption n) throws java.lang.Exception
visitOption
in interface INodeVisitor
java.lang.Exception
public void visitBR(BR n) throws java.lang.Exception
visitBR
in interface INodeVisitor
java.lang.Exception
public void visitTextArea(TextArea n) throws java.lang.Exception
visitTextArea
in interface INodeVisitor
java.lang.Exception
INodeVisitor.visitTextArea(to.etc.domui.dom.html.TextArea)
public void visitForm(Form n) throws java.lang.Exception
visitForm
in interface INodeVisitor
java.lang.Exception
@Deprecated public void visitLiteralXhtml(LiteralXhtml n) throws java.lang.Exception
visitLiteralXhtml
in interface INodeVisitor
java.lang.Exception
public void visitH(HTag n) throws java.lang.Exception
visitH
in interface INodeVisitor
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |