Package com.googlecode.jatl
Class Html
- java.lang.Object
-
- com.googlecode.jatl.MarkupBuilder<T>
-
- com.googlecode.jatl.GeneratedHtmlBuilder<T>
-
- com.googlecode.jatl.HtmlBuilder<Html>
-
- com.googlecode.jatl.Html
-
public class Html extends HtmlBuilder<Html>
Most of the XHTML tags and attributes are available as methods. A rule of thumb is that most tags are zero parameter methods and attribute methods are single parameter.Example:
new Html(writer) {{ html().head(); title().text("Hello").end(); h1().id("title").text("World").end(); done(); }};
If you would like to extend an HTML builder DO NOT INHERIT FROM THIS CLASS.
Instead inherit from
HtmlBuilder
and parameterize with the name of your custom builder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.googlecode.jatl.MarkupBuilder
MarkupBuilder.TagClosingPolicy
-
-
Field Summary
-
Fields inherited from class com.googlecode.jatl.MarkupBuilder
indentOff, indentOn, indentSameLine
-
-
Constructor Summary
Constructors Constructor Description Html(MarkupBuilder<?> builder)
Html(MarkupBuilder<?> builder, boolean nested)
Html(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Html
getSelf()
Needed for fluent style and Java parameterization limitations.-
Methods inherited from class com.googlecode.jatl.HtmlBuilder
checkbox, checkbox, escapeMarkup, option
-
Methods inherited from class com.googlecode.jatl.GeneratedHtmlBuilder
a, abbr, abbr, accept, acceptCharset, accesskey, acronym, action, address, align, alink, alt, applet, archive, area, axis, b, background, base, basefont, bdo, bgcolor, big, blockquote, body, border, br, button, caption, cellpadding, cellspacing, center, charAttr, charoff, charset, checked, cite, cite, classAttr, classid, clear, code, code, codebase, codetype, col, colgroup, color, cols, colspan, compact, content, coords, data, datetime, dd, declare, defer, del, dfn, dir, dir, disabled, div, dl, dt, em, enctype, face, fieldset, font, forAttr, form, frame, frameborder, h1, h2, h3, h4, h5, h6, head, headers, height, hr, href, hreflang, hspace, html, httpEquiv, i, id, iframe, img, input, ins, isindex, ismap, kbd, label, label, lang, language, legend, li, link, link, longdesc, map, marginheight, marginwidth, maxlength, media, menu, meta, method, multiple, name, noframes, nohref, noscript, noshade, nowrap, object, object, ol, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onreset, onselect, onsubmit, onunload, optgroup, option, p, param, pre, profile, prompt, q, readonly, rel, rev, rows, rowspan, rules, s, samp, scheme, scope, script, scrolling, select, selected, shape, size, small, span, span, src, standby, startAttr, strike, strong, style, style, sub, summary, sup, tabindex, table, target, tbody, td, textarea, textAttr, tfoot, th, thead, title, title, tr, tt, type, u, ul, usemap, valign, value, valuetype, var, vlink, vspace, width
-
-
-
-
Constructor Detail
-
Html
public Html(java.io.Writer writer)
- Parameters:
writer
- nevernull
.
-
Html
public Html(MarkupBuilder<?> builder)
- Parameters:
builder
- nevernull
.
-
Html
public Html(MarkupBuilder<?> builder, boolean nested)
- Parameters:
builder
- nevernull
.nested
- nevernull
.
-
-
Method Detail
-
getSelf
protected Html getSelf()
Needed for fluent style and Java parameterization limitations. Almost all public methods should return whatever this method returns.Most implementations only have to do:
return this;
- Specified by:
getSelf
in classMarkupBuilder<Html>
- Returns:
- the current builder which is usually
this
object.
-
-