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.comp;
15:
16: import org.w3c.dom.Element;
17:
18: /**
19: * Used by list components to obtain the content parent element of
20: * a child element of the list.
21: *
22: *
23: * @author Jose Maria Arranz Santamaria
24: * @see ItsNatComponentManager#createDefaultItsNatListStructure()
25: * @see ItsNatList#getItsNatListStructure()
26: * @see org.itsnat.core.domutil.ElementListStructure
27: */
28: public interface ItsNatListStructure {
29: /**
30: * Returns the content element of a child element. This element is used to render
31: * or edit the item value.
32: *
33: * <p>Default implementation delegates to the default {@link org.itsnat.core.domutil.ElementListStructure}.</p>
34: *
35: * @param list the list component, may be used to provide contextual information. Default implementation ignores it.
36: * @param index the list item index.
37: * @param itemElem the element containing the list item markup in this position.
38: * Is a hint, if provided should be obtained by calling <code>list.getItsNatListUI().getElementAt(index)</code>.
39: * @return the content element.
40: * @see ItsNatListCellRenderer
41: * @see ItsNatListCellEditor
42: */
43: public Element getContentElement(ItsNatList list, int index,
44: Element itemElem);
45: }
|