01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.impl.comp.ui;
15:
16: import org.itsnat.comp.ItsNatTable;
17: import org.itsnat.comp.ItsNatTableHeader;
18: import org.itsnat.comp.ItsNatTableStructure;
19: import org.itsnat.core.domutil.ElementList;
20: import org.itsnat.core.domutil.ElementListStructure;
21: import org.itsnat.core.domutil.ElementTable;
22: import org.itsnat.core.domutil.ElementTableStructure;
23: import org.w3c.dom.Element;
24:
25: /**
26: *
27: * @author jmarranz
28: */
29: public class ItsNatTableStructureCoreAdapterImpl implements
30: ElementTableStructure, ElementListStructure {
31: protected ItsNatTableStructure structure;
32: protected ItsNatTable tableComp;
33: protected ItsNatTableHeader tableHeaderComp;
34:
35: /**
36: * Creates a new instance of ItsNatTableStructureCoreAdapterImpl
37: */
38: public ItsNatTableStructureCoreAdapterImpl(
39: ItsNatTableStructure structure, ItsNatTable tableComp,
40: ItsNatTableHeader tableHeaderComp) {
41: this .structure = structure;
42: this .tableComp = tableComp;
43: this .tableHeaderComp = tableHeaderComp;
44: }
45:
46: public Element getContentElement(ElementList list, int index,
47: Element elem) {
48: return structure.getHeaderColumnContentElement(tableHeaderComp,
49: index, elem);
50: }
51:
52: public Element getRowContentElement(ElementTable table, int row,
53: Element rowElem) {
54: return structure.getRowContentElement(tableComp, row, rowElem);
55: }
56:
57: public Element getCellContentElement(ElementTable table, int row,
58: int col, Element cellElem) {
59: return structure.getCellContentElement(tableComp, row, col,
60: cellElem);
61: }
62: }
|