01: // @@
02: // @@
03: /*
04: * Wi.Ser Framework
05: *
06: * LGPL Version: 1.8.1, 20-September-2007
07: * Copyright (C) 2005-2006 Dirk von der Weiden <dvdw@imail.de>
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * version 2 of the License, or (at your option) any later version.
13: *
14: * This library is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library located in LGPL.txt in the
21: * license directory; if not, write to the
22: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23: * Boston, MA 02111-1307, USA.
24: *
25: * If this agreement does not cover your requirements, please contact us
26: * via email to get detailed information about the commercial license
27: * or our service offerings!
28: *
29: */
30: // @@
31: package de.ug2t.unifiedGui.cellRenderer.implementations.table;
32:
33: import de.ug2t.kernel.*;
34: import de.ug2t.unifiedGui.*;
35: import de.ug2t.unifiedGui.cellRenderer.*;
36: import de.ug2t.unifiedGui.interfaces.*;
37:
38: public class SimpleTableRenderer extends AUnTableItemRenderer {
39: public Object pcmf_getRenderWidget(Object xToRender, int xRow,
40: int xCol, IUnTable xTable) {
41: if (xRow == 0) {
42: UnApplicationFactory l_fact = new UnApplicationFactory("",
43: xTable.pcmf_getAppl().pcmf_getComponentFactory(),
44: false);
45: l_fact.pcmf_useNonStaticHandler(true);
46:
47: try {
48: UnComponent l_node = null;
49:
50: KeRegisteredObject.pcmf_unRegister("RgTableTitle");
51: KeRegisteredObject.pcmf_register("RgTableTitle",
52: xToRender.toString());
53:
54: l_node = (UnComponent) l_fact
55: .pcmf_produceWidgetsFromFile(
56: xTable.pcmf_getAppl()
57: .pcmf_getApplType(),
58: "xml_gui_fragments/simpleTableHeader.xml",
59: xTable.pcmf_getAppl());
60:
61: l_node.pcmf_setAdditionalInfo(xTable);
62:
63: KeRegisteredObject.pcmf_reRegister(
64: "RgTableRendererInit", "TRUE");
65:
66: return (l_node);
67: } catch (Exception e) {
68: KeLog.pcmf_logException("csc", this, e);
69: }
70: }
71:
72: return xToRender;
73: }
74: }
|