public class HtmlBuilder extends HtmlPrinter implements XMLContentBuilder
HtmlPrinter that also implements ContentBuilder
in terms of web based interfaces.HtmlWriter![]() |
![]() |
![]() |
![]() |
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HtmlBuilder.Heading |
static class |
HtmlBuilder.Panel
A nested
HtmlBuilder representing an element. |
protected static class |
HtmlBuilder.SpanText
A
HtmlBuilder.Panel for in-line text. |
protected static class |
HtmlBuilder.Text |
| Modifier and Type | Field and Description |
|---|---|
static Feature |
HTML_TABLE_HEADER_SCOPE_FEATURE |
static Feature |
HTML_TABLE_SECTIONS_FEATURE |
sbSTREAM_BUILDER_FEATURE| Constructor and Description |
|---|
HtmlBuilder() |
HtmlBuilder(AbstractXMLBuilder parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addActionButtons(Form f,
java.lang.String legend,
java.util.Set<java.lang.String> actions)
A a set of action buttons to the content
|
ContentBuilder |
addParent()
append a nested panel to its parent content.
|
void |
addScript(java.lang.String script)
Add a script element to HTML.
|
void |
addScriptFile(java.lang.String path) |
<C,R> void |
addTable(AppContext conn,
Table<C,R> t,
java.text.NumberFormat nf,
java.lang.String style)
Add a table to the content.
|
void |
closeDetails()
finish a section started by
ContentBuilder.getDetails(Object)
this may be a no-op if expended section are not supported |
ContentBuilder |
getDetails(java.lang.Object summary_text)
get an expanding/folding section if supported
This method can either return a new
ContentBuilder or
the current object. |
HtmlFormPolicy |
getFormPolicy() |
ContentBuilder |
getHeading(int level)
create a
ContentBuilder that appends its contents as a
heading when the ContentBuilder.addParent() method is called. |
Logger |
getLogger(AppContext conn) |
ContentBuilder |
getPanel(java.lang.String... type)
create a nested content panel
|
ContentBuilder |
getPanel(java.lang.String type) |
ExtendedXMLBuilder |
getSpan()
create a
ExtendedXMLBuilder that appends its contents as XML
text when the SimpleXMLBuilder.appendParent() method is called. |
ExtendedXMLBuilder |
getText()
create a
ExtendedXMLBuilder that appends its contents as XML
text when the SimpleXMLBuilder.appendParent() method is called. |
void |
paragraph(java.lang.String text) |
boolean |
setNewTab(boolean new_tab) |
void |
setTableSections(boolean value) |
static java.lang.String |
strip(java.lang.String input) |
boolean |
useNewTab() |
append, append, appendParent, appendTo, clear, getNested, getParent, hasContent, toStringaddClass, append, attr, attr, badAttribute, br, clean, clean, clean, cleanFormatted, close, closeElement, doClean, doClean, endOpen, getAttribute, getEscapeUnicode, getTags, getValidXML, isInOpen, longLines, matched, nbs, open, open, openElement, setEscapeUnicode, setValidXMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddButton, addButton, addColumn, addFormInput, addFormLabel, addFormTable, addHeading, addImage, addLink, addLink, addList, addList, addList, addNumberedList, addObject, addTable, addTable, addTable, addText, append, canAddaddActionButtons, addFormLabel, cleanFormatted, getSpanaddClass, br, nbsappendParent, attr, attr, clean, clean, clean, close, getNested, getParent, open, open, setEscapeUnicodepublic static final Feature HTML_TABLE_SECTIONS_FEATURE
public static final Feature HTML_TABLE_HEADER_SCOPE_FEATURE
public HtmlBuilder()
public HtmlBuilder(AbstractXMLBuilder parent)
public <C,R> void addTable(AppContext conn, Table<C,R> t, java.text.NumberFormat nf, java.lang.String style)
ContentBuilderUIGenerator should be added via UIGenerator.addContent(ContentBuilder)addTable in interface ContentBuilderaddTable in interface XMLContentBuilderpublic void paragraph(java.lang.String text)
public ExtendedXMLBuilder getText()
ContentBuilderExtendedXMLBuilder that appends its contents as XML
text when the SimpleXMLBuilder.appendParent() method is called.
Normally this represents a separate paragraph of text but this can be mapped
onto ContentBuilder.getSpan() where this does not make sense for example where the
ContentBuilder represents a heading or table cell.getText in interface ContentBuilderpublic ExtendedXMLBuilder getSpan()
ContentBuilderExtendedXMLBuilder that appends its contents as XML
text when the SimpleXMLBuilder.appendParent() method is called.
This is intended for in-line text rather than creating a paragraph.getSpan in interface ContentBuilderExtendedXMLBuilderpublic ContentBuilder getHeading(int level)
ContentBuilderContentBuilder that appends its contents as a
heading when the ContentBuilder.addParent() method is called.
If the heading is to only contain text use the ContentBuilder.addHeading(int, String) method.getHeading in interface ContentBuilderlevel - level of headingpublic ContentBuilder getPanel(java.lang.String... type) throws java.lang.UnsupportedOperationException
ContentBuildergetPanel in interface ContentBuildertype - Strings specifying a formatting types for the panel.java.lang.UnsupportedOperationExceptionpublic ContentBuilder getPanel(java.lang.String type) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationExceptionpublic ContentBuilder addParent() throws java.lang.UnsupportedOperationException
ContentBuilderaddParent in interface ContentBuilderjava.lang.UnsupportedOperationExceptionpublic void addActionButtons(Form f, java.lang.String legend, java.util.Set<java.lang.String> actions)
ContentBuilderaddActionButtons in interface ContentBuilderaddActionButtons in interface XMLContentBuilderf - Formlegend - optional legend for the button setactions - Set of action namespublic void setTableSections(boolean value)
public final ContentBuilder getDetails(java.lang.Object summary_text)
ContentBuilderContentBuilder or
the current object. Once content has been added the ContentBuilder.closeDetails()
method should be called on whichever object was returned which will
perform any additional actions necessary.
If expanded/folding sections are not supported this will map to
ContentBuilder.addObject(Object) on the summary text
and the current ContentBuilder will be returned.getDetails in interface ContentBuildergetDetails in interface XMLContentBuilderpublic final void closeDetails()
ContentBuilderContentBuilder.getDetails(Object)
this may be a no-op if expended section are not supportedcloseDetails in interface ContentBuildercloseDetails in interface XMLContentBuilderpublic void addScript(java.lang.String script)
script - public void addScriptFile(java.lang.String path)
public final Logger getLogger(AppContext conn)
getLogger in interface XMLContentBuilderpublic boolean useNewTab()
useNewTab in interface XMLContentBuilderpublic HtmlFormPolicy getFormPolicy()
getFormPolicy in interface XMLContentBuilderpublic boolean setNewTab(boolean new_tab)
setNewTab in interface XMLContentBuilderpublic static java.lang.String strip(java.lang.String input)