01: /*
02: * Coefficient - facilitates project based collaboration
03: * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
04: * PO Box 395
05: * Pretoria 0001, RSA
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19:
20: package za.org.coefficient.themes.printerUtilTheme;
21:
22: import za.org.coefficient.html.Theme;
23: import za.org.coefficient.html.Page;
24:
25: /**
26: * @pojo2ejb.class
27: * name="PrinterUtilTheme"
28: * jndi-prefix="za/org/coefficient/utilityThemes/"
29: * interface-extends="za.org.coefficient.interfaces.ThemeIf"
30: * interface-local-extends="za.org.coefficient.interfaces.ThemeLocalIf"
31: *
32: * @web.resource-env-ref
33: * name="za/org/coefficient/utilityThemes/PrinterUtilTheme"
34: * type="za.org.coefficient.themes.printerUtilTheme.PrinterUtilTheme"
35: * @web.resource-env-ref
36: * name="PrinterUtilTheme"
37: * type="za.org.coefficient.themes.printerUtilTheme.PrinterUtilTheme"
38: */
39: public class PrinterUtilTheme extends Theme {
40: //~ Constructors ===========================================================
41:
42: public PrinterUtilTheme() {
43: init("PrinterUtilTheme");
44: }
45:
46: public void format(Page page, String moduleName, String html) {
47: page.setCenterContent(html, null, moduleName);
48: }
49:
50: public String getCenter(Page page) {
51: StringBuffer sb = new StringBuffer("");
52: sb.append(page.getCenterContent(false));
53:
54: return sb.toString();
55: }
56: }
|