org.itsnat.comp.list
Interface ItsNatListUI

All Superinterfaces:
ItsNatComponentUI, ItsNatElementComponentUI
All Known Subinterfaces:
ItsNatHTMLSelectUI

public interface ItsNatListUI
extends ItsNatElementComponentUI

Is the base interface of the User Interface of a list component.

List items are managed as a DOM element list, using the current list structure and renderer.

Current implementation does not use the data model and relays heavily on ElementList.

Indexes are 0 based.

Author:
Jose Maria Arranz Santamaria
See Also:
ItsNatList.getItsNatListUI(), ItsNatList.getItsNatListCellRenderer(), ItsNatList.getItsNatListStructure()

Method Summary
 org.w3c.dom.Element getContentElementAt(int index)
          Returns the "content" element, this element is used to render below the associated value of the child element.
 org.w3c.dom.Element getElementAt(int index)
          Returns the child element at the specified index.
 ItsNatList getItsNatList()
          Returns the associated component object.
 ItsNatListCellUI getItsNatListCellUIAt(int index)
          Returns an object info of the child element at the specified position.
 ItsNatListCellUI getItsNatListCellUIFromNode(org.w3c.dom.Node node)
          Returns an object info of the child element containing the specified node (or the node is itself an element of the list).
 int getLength()
          Returns the number of child elements.
 boolean isEmpty()
          Informs whether the list is empty (no elements).
 boolean isUsePatternMarkupToRender()
          Informs whether the original (saved as pattern) markup is used to render.
 void setUsePatternMarkupToRender(boolean value)
          Sets whether the original (saved as pattern) markup is used to render.
 
Methods inherited from interface org.itsnat.comp.ItsNatElementComponentUI
getItsNatElementComponent
 
Methods inherited from interface org.itsnat.comp.ItsNatComponentUI
getItsNatComponent
 

Method Detail

getItsNatList

ItsNatList getItsNatList()
Returns the associated component object.

Returns:
the component object.

getLength

int getLength()
Returns the number of child elements.

Returns:
the number of child elements.
See Also:
NodeList.getLength()

isEmpty

boolean isEmpty()
Informs whether the list is empty (no elements).

Returns:
true if the list is empty.
See Also:
ElementListBase.isEmpty()

getElementAt

org.w3c.dom.Element getElementAt(int index)
Returns the child element at the specified index.

Parameters:
index - index of the child element to search.
Returns:
the element in this position or null if index is out of range.
See Also:
ElementListBase.getElementAt(int)

getContentElementAt

org.w3c.dom.Element getContentElementAt(int index)
Returns the "content" element, this element is used to render below the associated value of the child element. This element is obtained using the current structure.

Parameters:
index - index of the element.
Returns:
the content element.
See Also:
ItsNatListStructure.getContentElement(ItsNatList,int,Element), ElementList.getContentElementAt(int)

getItsNatListCellUIAt

ItsNatListCellUI getItsNatListCellUIAt(int index)
Returns an object info of the child element at the specified position.

Parameters:
index - index of the element to search for.
Returns:
the object info of the matched child element. Null if index is out of range. This object is ever the same per list item and may be used to save any context data.
See Also:
getItsNatListCellUIFromNode(Node), ElementListBase.getListElementInfoAt(int)

getItsNatListCellUIFromNode

ItsNatListCellUI getItsNatListCellUIFromNode(org.w3c.dom.Node node)
Returns an object info of the child element containing the specified node (or the node is itself an element of the list).

Parameters:
node - the node to search for.
Returns:
the object info of the matched child element. Null if this node is not contained by the list. This object is ever the same per list item and may be used to save any context data.
See Also:
getItsNatListCellUIAt(int), ElementListBase.getListElementInfoFromNode(Node)

isUsePatternMarkupToRender

boolean isUsePatternMarkupToRender()
Informs whether the original (saved as pattern) markup is used to render.

The default value is defined by ItsNatDocument.isUsePatternMarkupToRender()

Returns:
true if the original markup is used.
See Also:
setUsePatternMarkupToRender(boolean)

setUsePatternMarkupToRender

void setUsePatternMarkupToRender(boolean value)
Sets whether the original (saved as pattern) markup is used to render.

Parameters:
value - true to enable the use of original markup to render.
See Also:
isUsePatternMarkupToRender()


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