public interface ElementListFree extends ElementListBase, List<Element>
The interface inherits from java.util.List and supports
both types of iterators. List and Iterator methods
accept and return DOM Element objects.
ElementGroupManager.createElementListFree(Element,boolean)| Modifier and Type | Method and Description |
|---|---|
void |
addElement(Element elem)
Adds a new child element at the end of the list.
|
void |
insertElementAt(int index,
Element elem)
Inserts a new child element at the specified position.
|
boolean |
isMaster()
Informs whether the list works in master mode.
|
Element |
setElementAt(int index,
Element elem)
Replaces the specified element with a new one.
|
Element[] |
setElements(Element[] newElems)
Clears the current list and fills again with new elements.
|
getElementAt, getElementFromNode, getElements, getFirstElement, getLastElement, getListElementInfoAt, getListElementInfoFromNode, indexOfElement, isEmpty, lastIndexOfElement, moveElement, removeAllElements, removeElementAt, removeElementRangegetItsNatDocument, getParentElementcontainsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValueboolean isMaster()
In master mode DOM elements must be added, removed or replaced
using this interface avoiding direct DOM operations (Node.appendChild,
Node.removeChild etc), this is the fastest mode.
In slave mode (master is false) direct DOM operations
can be used and element list changes are automatically reflected by this
object, nevertheless method calls are slower in this mode.
void addElement(Element elem)
If the new element is already in the list a deep clone
(calling Node.cloneNode(boolean deep)) is inserted. This avoids
an indirect delete by DOM.
elem - the new element.insertElementAt(int,org.w3c.dom.Element)void insertElementAt(int index,
Element elem)
If the new element is already in the list a deep clone
(calling Node.cloneNode(boolean deep)) is inserted. This avoids
an indirect delete by DOM.
index - index of the element.elem - the new element.addElement(Element)Element setElementAt(int index, Element elem)
If the new element is already in the list a deep clone
(calling Node.cloneNode(boolean deep)) is used to replac the element in that
position. This avoids an indirect delete by DOM.
index - index of the element.elem - the new element.ElementListBase.getElementAt(int),
insertElementAt(int,Element)Element[] setElements(Element[] newElems)
If the new element is already in the list a deep clone
(calling Node.cloneNode(boolean deep)) is used to replace the element in that
position. This avoids an indirect delete by DOM.
newElems - new elements.ElementListBase.getElements()Copyright © Innowhere Software, Jose Maria Arranz Santamaria.