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.html.ui;
15:
16: import org.itsnat.comp.html.ItsNatHTMLElementComponent;
17: import org.itsnat.comp.html.ItsNatHTMLTable;
18: import org.itsnat.comp.html.ui.ItsNatHTMLTableHeaderUI;
19: import org.itsnat.comp.html.ui.ItsNatHTMLTableUI;
20: import org.itsnat.impl.comp.html.ItsNatHTMLTableImpl;
21: import org.itsnat.impl.comp.ui.ItsNatTableUIImpl;
22: import org.w3c.dom.html.HTMLTableCellElement;
23: import org.w3c.dom.html.HTMLTableElement;
24: import org.w3c.dom.html.HTMLTableRowElement;
25: import org.w3c.dom.html.HTMLTableSectionElement;
26:
27: /**
28: *
29: * @author jmarranz
30: */
31: public class ItsNatHTMLTableUIImpl extends ItsNatTableUIImpl implements
32: ItsNatHTMLTableUI {
33:
34: /**
35: * Creates a new instance of ItsNatHTMLTableUIImpl
36: */
37: public ItsNatHTMLTableUIImpl(ItsNatHTMLTableImpl parentComp) {
38: super (parentComp);
39: }
40:
41: public ItsNatHTMLTableHeaderUI getItsNatHTMLTableHeaderUI() {
42: return (ItsNatHTMLTableHeaderUI) getItsNatTableHeaderUI();
43: }
44:
45: public ItsNatHTMLTable getItsNatHTMLTable() {
46: return (ItsNatHTMLTable) parentComp;
47: }
48:
49: public HTMLTableElement getHTMLTableElement() {
50: return getItsNatHTMLTable().getHTMLTableElement();
51: }
52:
53: public HTMLTableSectionElement getHTMLTableSectionElement() {
54: return (HTMLTableSectionElement) getBodyElement(); // El <tbody>
55: }
56:
57: public HTMLTableRowElement getHTMLTableRowElementAt(int row) {
58: return (HTMLTableRowElement) getRowElementAt(row);
59: }
60:
61: public HTMLTableCellElement[] getHTMLTableCellElementsOfRow(int row) {
62: return (HTMLTableCellElement[]) getCellElementsOfRow(row);
63: }
64:
65: public HTMLTableCellElement[] getHTMLTableCellElementsOfColumn(
66: int column) {
67: return (HTMLTableCellElement[]) getCellElementsOfColumn(column);
68: }
69:
70: public HTMLTableCellElement getHTMLTableCellElementAt(int row,
71: int column) {
72: return (HTMLTableCellElement) getCellElementAt(row, column);
73: }
74:
75: public ItsNatHTMLElementComponent getItsNatHTMLElementComponent() {
76: return (ItsNatHTMLElementComponent) parentComp;
77: }
78: }
|