}
Color foreground = (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_FOREGROUND);
if (foreground != null) {
initElement.setAttribute("foreground", ColorRender.renderCssAttributeValue(foreground));
}
Font font = (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_FONT);
if (font != null) {
CssStyle fontCssStyle = new CssStyle();
FontRender.renderToStyle(fontCssStyle, font);
initElement.setAttribute("font", fontCssStyle.renderInline());
}
// Positioning
renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_X, initElement, "position-x");
renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_Y, initElement, "position-y");
renderPixelProperty(windowPane, WindowPane.PROPERTY_WIDTH, initElement, "width");
renderPixelProperty(windowPane, WindowPane.PROPERTY_HEIGHT, initElement, "height");
renderPixelProperty(windowPane, WindowPane.PROPERTY_MINIMUM_WIDTH, initElement, "minimum-width");
renderPixelProperty(windowPane, WindowPane.PROPERTY_MINIMUM_HEIGHT, initElement, "minimum-height");
renderPixelProperty(windowPane, WindowPane.PROPERTY_MAXIMUM_WIDTH, initElement, "maximum-width");
renderPixelProperty(windowPane, WindowPane.PROPERTY_MAXIMUM_HEIGHT, initElement, "maximum-height");
int fillImageRenderFlags = ((Boolean) windowPane.getRenderProperty(PROPERTY_IE_ALPHA_RENDER_BORDER,
Boolean.FALSE)).booleanValue() ? FillImageRender.FLAG_ENABLE_IE_PNG_ALPHA_FILTER : 0;
// Title-related
if (windowPane.getRenderProperty(WindowPane.PROPERTY_ICON) != null) {
initElement.setAttribute("icon", ImageTools.getUri(rc, this, windowPane, IMAGE_ID_ICON));
Insets iconInsets = (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_ICON_INSETS);
if (iconInsets != null) {
initElement.setAttribute("icon-insets", InsetsRender.renderCssAttributeValue(iconInsets));
}
}
String title = (String) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE);
if (title != null) {
initElement.setAttribute("title", title);
Insets titleInsets = (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_INSETS);
Color titleForeground = (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FOREGROUND);
if (titleForeground != null) {
initElement.setAttribute("title-foreground", ColorRender.renderCssAttributeValue(titleForeground));
}
if (titleInsets != null) {
initElement.setAttribute("title-insets", InsetsRender.renderCssAttributeValue(titleInsets));
}
Font titleFont = (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FONT);
if (titleFont != null) {
CssStyle fontCssStyle = new CssStyle();
FontRender.renderToStyle(fontCssStyle, titleFont);
initElement.setAttribute("title-font", fontCssStyle.renderInline());
}