01: /*
02: * de.jwic.web.ContentRenderer
03: * $Id: ContentRenderer.java,v 1.1 2006/01/16 08:31:13 lordsam Exp $
04: */
05: package de.jwic.web;
06:
07: import de.jwic.base.Control;
08: import de.jwic.base.IControlRenderer;
09: import de.jwic.base.JWicRuntime;
10: import de.jwic.base.RenderContext;
11:
12: /**
13: * Used by the webEngine to render the root control.
14: * @author Florian Lippisch
15: * @version $Revision: 1.1 $
16: */
17: public class ContentRenderer {
18:
19: private Control ctrl;
20: private RenderContext context;
21:
22: public ContentRenderer(Control control, RenderContext context) {
23: this .ctrl = control;
24: this .context = context;
25: }
26:
27: /**
28: * Render the root control.
29: * @return
30: */
31: public void render() {
32:
33: IControlRenderer renderer = JWicRuntime.getRenderer(ctrl
34: .getRendererId());
35: renderer.renderControl(ctrl, context);
36:
37: }
38:
39: }
|