01: /*
02: * This file is not part of the ItsNat framework.
03: *
04: * Original source code use and closed source derivatives are authorized
05: * to third parties with no restriction or fee.
06: * The original source code is owned by the author.
07: *
08: * This program is distributed AS IS in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11: *
12: * Author: Jose Maria Arranz Santamaria
13: * (C) Innowhere Software Services S.L., Spanish company, year 2007
14: */
15:
16: package org.itsnat.feashow.features.components.lists;
17:
18: import org.itsnat.comp.ItsNatList;
19: import org.itsnat.comp.ItsNatListStructure;
20: import org.itsnat.core.domutil.ItsNatTreeWalker;
21: import org.w3c.dom.Element;
22: import org.w3c.dom.html.HTMLTableCellElement;
23: import org.w3c.dom.html.HTMLTableRowElement;
24:
25: public class CityListCustomStructure implements ItsNatListStructure {
26: public CityListCustomStructure() {
27: }
28:
29: public Element getContentElement(ItsNatList list, int index,
30: Element parentElem) {
31: HTMLTableRowElement rowElem = (HTMLTableRowElement) parentElem;
32: HTMLTableCellElement firstCellElem = (HTMLTableCellElement) ItsNatTreeWalker
33: .getFirstChildElement(rowElem);
34: HTMLTableCellElement secondCellElem = (HTMLTableCellElement) ItsNatTreeWalker
35: .getNextSiblingElement(firstCellElem);
36: return secondCellElem;
37: }
38: }
|