/**
* @see nextapp.echo2.webcontainer.DomUpdateSupport#renderHtml(nextapp.echo2.webcontainer.RenderContext,
* nextapp.echo2.app.update.ServerComponentUpdate, org.w3c.dom.Node, nextapp.echo2.app.Component)
*/
public void renderHtml(RenderContext rc, ServerComponentUpdate update, Node parentNode, Component component) {
ContentPane contentPane = (ContentPane) component;
ServerMessage serverMessage = rc.getServerMessage();
serverMessage.addLibrary(CONTENT_PANE_SERVICE.getId());
Document document = parentNode.getOwnerDocument();
Element divElement = document.createElement("div");
divElement.setAttribute("id", ContainerInstance.getElementId(component));
CssStyle cssStyle = new CssStyle();
cssStyle.setAttribute("position", "absolute");
cssStyle.setAttribute("width", "100%");
cssStyle.setAttribute("height", "100%");
cssStyle.setAttribute("overflow", "hidden");
cssStyle.setAttribute("z-index", "0");
ColorRender.renderToStyle(cssStyle, (Color) contentPane.getRenderProperty(ContentPane.PROPERTY_FOREGROUND),
(Color) contentPane.getRenderProperty(ContentPane.PROPERTY_BACKGROUND));
FontRender.renderToStyle(cssStyle, (Font) contentPane.getRenderProperty(ContentPane.PROPERTY_FONT));
FillImageRender.renderToStyle(cssStyle, rc, this, contentPane, IMAGE_ID_BACKGROUND,
(FillImage) contentPane.getRenderProperty(ContentPane.PROPERTY_BACKGROUND_IMAGE), 0);
divElement.setAttribute("style", cssStyle.renderInline());
parentNode.appendChild(divElement);
// Render initialization directive.
renderInitDirective(rc, contentPane);
Component[] children = contentPane.getVisibleComponents();
for (int i = 0; i < children.length; ++i) {
renderChild(rc, update, divElement, contentPane, children[i]);
}
}