public class HeaderDefaultAppearance extends Object implements Header.HeaderAppearance
Modifier and Type | Class and Description |
---|---|
static interface |
HeaderDefaultAppearance.HeaderResources |
static interface |
HeaderDefaultAppearance.HeaderStyle |
static interface |
HeaderDefaultAppearance.Template |
Modifier and Type | Field and Description |
---|---|
protected HeaderDefaultAppearance.HeaderResources |
resources |
protected HeaderDefaultAppearance.HeaderStyle |
style |
protected HeaderDefaultAppearance.Template |
template |
Constructor and Description |
---|
HeaderDefaultAppearance() |
HeaderDefaultAppearance(HeaderDefaultAppearance.HeaderResources resources) |
HeaderDefaultAppearance(HeaderDefaultAppearance.HeaderResources resources,
HeaderDefaultAppearance.Template template) |
Modifier and Type | Method and Description |
---|---|
XElement |
getBarElem(XElement parent)
Returns the bar element for the specified header.
|
XElement |
getHeadingElem(XElement parent)
Returns the heading element for the specified header.
|
void |
render(SafeHtmlBuilder sb)
Renders the appearance of a header as HTML into a
SafeHtmlBuilder
suitable for passing to Element#setInnerSafeHtml(SafeHtml) on a
container element. |
void |
setIcon(XElement parent,
ImageResource icon)
Sets the icon for the specified header.
|
protected final HeaderDefaultAppearance.HeaderResources resources
protected HeaderDefaultAppearance.Template template
protected final HeaderDefaultAppearance.HeaderStyle style
public HeaderDefaultAppearance()
public HeaderDefaultAppearance(HeaderDefaultAppearance.HeaderResources resources)
public HeaderDefaultAppearance(HeaderDefaultAppearance.HeaderResources resources, HeaderDefaultAppearance.Template template)
public XElement getBarElem(XElement parent)
Header.HeaderAppearance
getBarElem
in interface Header.HeaderAppearance
parent
- the header root elementpublic XElement getHeadingElem(XElement parent)
Header.HeaderAppearance
getHeadingElem
in interface Header.HeaderAppearance
parent
- the header root elementpublic void render(SafeHtmlBuilder sb)
Header.HeaderAppearance
SafeHtmlBuilder
suitable for passing to Element#setInnerSafeHtml(SafeHtml)
on a
container element.render
in interface Header.HeaderAppearance
sb
- receives the rendered appearancepublic void setIcon(XElement parent, ImageResource icon)
Header.HeaderAppearance
setIcon
in interface Header.HeaderAppearance
parent
- the header root elementicon
- the icon to display in the headerCopyright © 2018. All rights reserved.