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.xmlcomp;
17:
18: import org.itsnat.comp.ItsNatList;
19: import org.itsnat.comp.ItsNatListCellRenderer;
20: import org.itsnat.core.domutil.ItsNatDOMUtil;
21: import org.w3c.dom.Element;
22:
23: public class SongListRenderer implements ItsNatListCellRenderer {
24: public final static SongListRenderer SINGLETON = new SongListRenderer();
25:
26: public SongListRenderer() {
27: }
28:
29: public void renderListCell(ItsNatList list, int index,
30: Object value, boolean isSelected, boolean cellHasFocus,
31: Element cellElem, boolean isNew) {
32: Song song = (Song) value;
33: ItsNatDOMUtil.setTextContent(cellElem, song.getName());
34: }
35:
36: public void unrenderListCell(ItsNatList list, int index,
37: Element cellContentElem) {
38: }
39: }
|