org.itsnat.comp.list
Interface ItsNatListCellRenderer


public interface ItsNatListCellRenderer

Is used to render list item values as markup into DOM elements.

Author:
Jose Maria Arranz Santamaria
See Also:
ItsNatComponentManager.createDefaultItsNatListCellRenderer(), ItsNatList.getItsNatListCellRenderer(), ItsNatList.setItsNatListCellRenderer(ItsNatListCellRenderer)

Method Summary
 void renderListCell(ItsNatList list, int index, java.lang.Object value, boolean isSelected, boolean hasFocus, org.w3c.dom.Element cellContentElem, boolean isNew)
          Renders as markup the specified list item value into the specified element, usually as a text node.
 void unrenderListCell(ItsNatList list, int index, org.w3c.dom.Element cellContentElem)
          Unrenders the markup of the specified list item.
 

Method Detail

renderListCell

void renderListCell(ItsNatList list,
                    int index,
                    java.lang.Object value,
                    boolean isSelected,
                    boolean hasFocus,
                    org.w3c.dom.Element cellContentElem,
                    boolean isNew)
Renders as markup the specified list item value into the specified element, usually as a text node.

Default implementation delegates to the default ElementRenderer.

Default implementation ignores isSelected and hasFocus (current implementation of ItsNat lists does not handle focus on list items, ever is false).

Parameters:
list - the list component, may be used to provide contextual information. Default implementation ignores it.
index - the list item index.
value - the value to render.
isSelected - true if the list item is selected.
hasFocus - true if the list item has the focus.
cellContentElem - the list item content element to render the value into. Is a hint, if provided should be obtained by calling list.getItsNatListUI().getContentElementAt(index).
isNew - true if this is the first time the markup is rendered. Default implementation ignores this parameter.

unrenderListCell

void unrenderListCell(ItsNatList list,
                      int index,
                      org.w3c.dom.Element cellContentElem)
Unrenders the markup of the specified list item. This method is called before the markup is removed.

Default implementation does nothing.

Parameters:
list - the list component, may be used to provide contextual information. Default implementation ignores it.
index - the list item index.
cellContentElem - the list item content element to render the value into. Is a hint, if provided should be obtained by calling list.getItsNatListUI().getContentElementAt(index).


Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.