public interface ElementTreeNodeList extends ElementGroup
The starting point may be a tree node list with almost a child tree node, this first child element is saved as the pattern (really a deep clone). If the list is initially empty the pattern used is the pattern of the parent tree node. New child tree nodes in the list are created using this pattern. The initial tree node list (including the pattern) may be initially cleared or kept as is when this object is created and attached to the underlying DOM list.
ElementGroupManager.createElementTreeNodeList(boolean,Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer)
,
ElementTreeNode.getChildTreeNodeList()
Modifier and Type | Method and Description |
---|---|
ElementTreeNode |
addTreeNode()
Adds a new child tree node at the end of the list using the pattern (the new tree node markup is a clone).
|
ElementTreeNode |
addTreeNode(java.lang.Object value)
Adds a new child tree node at the end of the list and renders the specified value using
the current structure and renderer.
|
org.w3c.dom.Element |
getChildPatternElement()
Returns the element used as a pattern.
|
ElementTreeNode |
getElementTreeNodeFromNode(org.w3c.dom.Node node)
Returns the tree node containing the specified node.
|
ElementTreeNodeRenderer |
getElementTreeNodeRenderer()
Returns the current renderer defined in this tree node list.
|
ElementTreeNodeStructure |
getElementTreeNodeStructure()
Returns the current structure defined in this tree node list.
|
ElementTreeNode |
getFirstTreeNode()
Returns the first child tree node (position 0).
|
ElementTreeNode |
getLastTreeNode()
Returns the last child tree node (position
getLength() - 1 ). |
int |
getLength()
Returns the number of child tree nodes in the list.
|
int |
getRowCount()
Returns the number of rows in the list.
|
ElementTreeNode |
getTreeNodeAt(int index)
Returns the tree node at the specified index.
|
ElementTreeNode[] |
getTreeNodes()
Returns the tree node list as an array.
|
ElementTreeNode |
insertTreeNodeAt(int index)
Inserts a new child tree node at the specified position using the pattern (the new tree node markup is a clone).
|
ElementTreeNode |
insertTreeNodeAt(int index,
java.lang.Object value)
Inserts a new child tree node at the specified position and renders the specified value using
the current structure and renderer.
|
boolean |
isEmpty()
Informs whether the tree node list is empty.
|
boolean |
isUsePatternMarkupToRender()
Informs whether the original (saved as pattern) markup is used to render.
|
void |
removeAllTreeNodes()
Removes all tree nodes.
|
ElementTreeNode |
removeTreeNodeAt(int index)
Removes the specified tree node.
|
void |
removeTreeNodeRange(int fromIndex,
int toIndex)
Removes the tree nodes between the specified indexes.
|
void |
setElementTreeNodeRenderer(ElementTreeNodeRenderer renderer)
Sets the renderer defined in this tree node list.
|
void |
setElementTreeNodeStructure(ElementTreeNodeStructure structure)
Sets the structure defined in this tree node list.
|
void |
setLength(int len)
Increases or shrinks the list to fit the new size.
|
void |
setUsePatternMarkupToRender(boolean value)
Sets whether the original (saved as pattern) markup is used to render.
|
getItsNatDocument, getParentElement
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
ElementTreeNodeStructure getElementTreeNodeStructure()
setElementTreeNodeStructure(ElementTreeNodeStructure)
void setElementTreeNodeStructure(ElementTreeNodeStructure structure)
structure
- the new structure.getElementTreeNodeStructure()
ElementTreeNodeRenderer getElementTreeNodeRenderer()
setElementTreeNodeRenderer(ElementTreeNodeRenderer)
void setElementTreeNodeRenderer(ElementTreeNodeRenderer renderer)
renderer
- the new renderer.getElementTreeNodeRenderer()
org.w3c.dom.Element getChildPatternElement()
boolean isEmpty()
ElementTreeNode removeTreeNodeAt(int index)
index
- index of the child tree node to remove.void removeTreeNodeRange(int fromIndex, int toIndex)
fromIndex
- low index (inclusive).toIndex
- high index (inclusive).void removeAllTreeNodes()
ElementTreeNode[] getTreeNodes()
ElementTreeNode getTreeNodeAt(int index)
index
- index of the tree node to search.ElementTreeNode getFirstTreeNode()
ElementTreeNode getLastTreeNode()
getLength() - 1
).ElementTreeNode getElementTreeNodeFromNode(org.w3c.dom.Node node)
node
- the node to search for.int getLength()
setLength(int)
int getRowCount()
void setLength(int len)
If the new size is bigger new tree nodes are added at the end, if the size is lower tail tree nodes are removed.
len
- the new length.getLength()
,
addTreeNode()
,
removeTreeNodeAt(int)
ElementTreeNode addTreeNode()
The new tree node uses the current structure and renderer of the list.
addTreeNode(Object)
ElementTreeNode addTreeNode(java.lang.Object value)
value
- the value to render.addTreeNode()
,
getElementTreeNodeStructure()
,
getElementTreeNodeRenderer()
ElementTreeNode insertTreeNodeAt(int index)
The new tree node uses the current structure and renderer of the list.
index
- index of the new tree node.insertTreeNodeAt(int,Object)
ElementTreeNode insertTreeNodeAt(int index, java.lang.Object value)
index
- index of the tree node.value
- the value to render.insertTreeNodeAt(int)
,
getElementTreeNodeStructure()
,
getElementTreeNodeRenderer()
boolean isUsePatternMarkupToRender()
The default value is defined by the parent tree node if exists or
by ItsNatDocument.isUsePatternMarkupToRender()
setUsePatternMarkupToRender(boolean)
void setUsePatternMarkupToRender(boolean value)
value
- true to enable the use of original markup to render.isUsePatternMarkupToRender()
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.