KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > theme > render > impl > EmptyWindowRenderer


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9
10 package org.jboss.portal.core.theme.render.impl;
11
12 import org.apache.log4j.Logger;
13 import org.jboss.portal.server.WindowContext;
14 import org.jboss.portal.server.output.FragmentResult;
15 import org.jboss.portal.server.theme.render.RenderContext;
16 import org.jboss.portal.server.theme.render.RenderException;
17 import org.jboss.portal.server.theme.render.WindowRenderer;
18
19 import javax.portlet.WindowState;
20
21 /**
22  * Implementation of a Window renderer that creates no markup, and only passed control to the
23  * Portlet renderer.
24  *
25  * @author <a HREF="mailto:mholzner@novell.com>Martin Holzner</a>
26  * @version $LastChangedRevision$, $LastChangedDate$
27  * @see WindowRenderer
28  */

29 public class EmptyWindowRenderer
30    implements WindowRenderer
31 {
32    private static Logger log = Logger.getLogger(EmptyWindowRenderer.class);
33
34    /**
35     * @see WindowRenderer#render
36     */

37    public void render(RenderContext renderContext, FragmentResult result) throws RenderException
38    {
39       log.debug("render window for portlet : " + result.getTitle());
40
41       WindowContext windowContext = result.getProducer();
42
43       renderContext.getDecorationRenderer().render(renderContext, windowContext, result);
44       if (!WindowState.MINIMIZED.equals(windowContext.getWindowState()))
45       {
46          renderContext.getPortletRenderer().render(renderContext, windowContext, result);
47       }
48    }
49
50    /**
51     * @see org.jboss.portal.server.theme.render.Renderer#renderStart
52     */

53    public void renderStart(RenderContext ctx)
54    {
55    }
56
57    /**
58     * @see org.jboss.portal.server.theme.render.Renderer#renderEnd
59     */

60    public void renderEnd(RenderContext ctx)
61    {
62    }
63 }
64
Popular Tags