View Javadoc

1   /***
2    *  The contents of this file are subject to the Mozilla Public
3    *  License Version 1.1 (the "License"); you may not use this file
4    *  except in compliance with the License. You may obtain a copy of
5    *  the License at http://www.mozilla.org/MPL/
6    *
7    *  Software distributed under the License is distributed on an "AS
8    *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9    *  implied. See the License for the specific language governing
10   *  rights and limitations under the License.
11   *
12   *  The Original Code is pow2WebGui library.
13   *
14   *  The Initial Owner of the Original Code is Power Of Two S.R.L.
15   *  Portions created by Power Of Two S.R.L. are Copyright (C) Power Of Two S.R.L.
16   *  All Rights Reserved.
17   *
18   * Contributor(s):
19   */
20  
21  package com.pow2.webgui.window;
22  
23  import org.apache.velocity.VelocityContext;
24  import com.pow2.webgui.*;
25  import com.pow2.util.*;
26  
27  
28  /***
29   *  "BackOffice" WindowDrawer class.
30   *  <br>
31   *  This class provides concrete implementation
32   *  of <code>getTemplateDescription</code> method.
33   *
34   * @author  Luca Fossato
35   * @created  12 August 2002
36   */
37  public class BOWindowDrawer extends WindowDrawer
38  {
39    /***
40     * Constructor.
41     *
42     * @param widget the widget to draw
43     */
44    public BOWindowDrawer(Widget widget)
45    {
46      super(widget);
47    }
48  
49  
50    /***
51     *  Gets the description of the Window template.
52     *
53     * @param  window  the window widget
54     * @param  context the current Velocity context
55     * @return  the description of the Window template
56     */
57    protected StringBuffer getTemplateDescription(Window window, VelocityContext context)
58    {
59      return new StringBuffer(VelocityUtil.getTemplate(context, "window/backoffice/body.vm"));
60    }
61  }