Search in sources :

Example 1 with LayoutManager

use of com.github.bordertech.wcomponents.layout.LayoutManager in project wcomponents by BorderTech.

the class WPanelRenderer method renderChildren.

/**
 * Paints the children contained within the panel. This defers rendering to a layout renderer (if available).
 *
 * @param panel the panel to paint.
 * @param renderContext the RenderContext to paint to.
 */
private void renderChildren(final WPanel panel, final WebXmlRenderContext renderContext) {
    LayoutManager layout = panel.getLayout();
    Renderer layoutRenderer = null;
    if (layout != null) {
        layoutRenderer = new RendererFactoryImpl().getRenderer(layout.getClass());
    }
    if (layoutRenderer == null) {
        renderContext.getWriter().appendTag("ui:content");
        paintChildren(panel, renderContext);
        renderContext.getWriter().appendEndTag("ui:content");
    } else {
        layoutRenderer.render(panel, renderContext);
    }
}
Also used : LayoutManager(com.github.bordertech.wcomponents.layout.LayoutManager) Renderer(com.github.bordertech.wcomponents.Renderer)

Aggregations

Renderer (com.github.bordertech.wcomponents.Renderer)1 LayoutManager (com.github.bordertech.wcomponents.layout.LayoutManager)1