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.core.domutil;
15:
16: import org.itsnat.core.ItsNatUserData;
17: import org.w3c.dom.Element;
18:
19: /**
20: * Contains the DOM Elements, row and cell, and the row and column indexes
21: * of a cell of a DOM element table.
22: *
23: * <p>If the parent table (which this object belongs to) is master, this object is ever the
24: * same instance per table cell element, supporting row and column changes (inserting or removing
25: * rows and columns) and DOM element changes (calling {@link ElementTableFree#setCellElementAt(int,int,org.w3c.dom.Element)} ).
26: * This feature is very interesting to save contextual
27: * data associated to the cell element (using {@link ItsNatUserData}).
28: * </p>
29: *
30: * <p>If the parent table is slave every object obtained is a new instance, {@link ItsNatUserData}
31: * can not be used.</p>
32: *
33: * @author Jose Maria Arranz Santamaria
34: * @see ElementTableBase#getTableCellElementInfoFromNode(Node)
35: * @see ElementTableBase#getTableCellElementInfoAt(int,int)
36: */
37: public interface TableCellElementInfo extends ItsNatUserData {
38: /**
39: * Returns the parent table this object belongs to.
40: *
41: * @return the parent table.
42: */
43: public ElementTableBase getParentTable();
44:
45: /**
46: * Returns the row DOM element (top) parent of the cell.
47: *
48: * @return the row element.
49: */
50: public Element getRowElement();
51:
52: /**
53: * Returns the row index of the cell.
54: *
55: * @return the row index.
56: */
57: public int getRowIndex();
58:
59: /**
60: * Returns the cell DOM element.
61: *
62: * @return the cell element.
63: */
64: public Element getCellElement();
65:
66: /**
67: * Returns the column index of the cell.
68: *
69: * @return the column index.
70: */
71: public int getColumnIndex();
72: }
|