| org.itsnat.core.domutil.ElementTableFree
All known Subclasses: org.itsnat.impl.core.domutil.ElementTableFreeImpl,
ElementTableFree | public interface ElementTableFree extends ElementTableBase,ElementListFree(Code) | | Represents an integer indexed DOM Element table, row elements and cell elements can have different
tag names (the meaning of "free").
The interface inherits from
ElementListFree and java.util.List
indirectly and supports both types of iterators. List and Iterator methods accept
and return DOM Element objects. They see the table as a list of rows.
The table can work in master and slave modes, see
ElementListFree.isMaster . If in master mode direct DOM
structural changes (add/remove/replace a row, column, cell) must be avoided.
In a "free" table the number of columns may not be the same between rows.
See Also: org.itsnat.core.ItsNatDocument.createElementTableFree(Elementboolean) author: Jose Maria Arranz Santamaria |
Method Summary | |
public void | addColumn(Element[] cells) Adds a new column at the end of columns.
If a new cell element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. | public void | addRow(Element elem) Adds a new row element at the end of the table.
If the new row element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. | public ElementListFree | getCellElementListOfRow(int row) Returns the cell elements of the specified row as an element list.
Modifications performed in this list affects to the original table.
Parameters: row - the row index. | public void | insertColumnAt(int column, Element[] cells) Inserts a new column at the specified position.
If a new cell element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. | public void | insertRowAt(int row, Element elem) Inserts a new row element at the specified position.
If the new row element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. | public Element | setCellElementAt(int row, int column, Element elem) Replaces the specified cell element with a new one.
If the new cell element is already in the list a deep clone
(calling Node.cloneNode(boolean deep) ) is used to replace the element in that
position. | public Element[] | setCellElementsOfColumn(int column, Element[] cells) Replaces the specified column with a new one.
If a new cell element is already in the list a deep clone
(calling Node.cloneNode(boolean deep) ) is used to replace the element in that
position. | public Element[] | setCellElementsOfRow(int row, Element[] cells) Clears the specified row and fills again with new elements. | public Element | setRowAt(int row, Element elem) Replaces the specified row element with a new one.
If the new row element is already in the list a deep clone
(calling Node.cloneNode(boolean deep) ) is used to replace the element in that
position. |
addColumn | public void addColumn(Element[] cells)(Code) | | Adds a new column at the end of columns.
If a new cell element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. This avoids
an indirect delete by DOM.
Parameters: cells - the cells of the new column. See Also: ElementTableFree.insertColumnAt(int,org.w3c.dom.Element[]) |
addRow | public void addRow(Element elem)(Code) | | Adds a new row element at the end of the table.
If the new row element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. This avoids
an indirect delete by DOM.
Parameters: elem - the new row element. See Also: ElementTableFree.insertRowAt(int,org.w3c.dom.Element) |
getCellElementListOfRow | public ElementListFree getCellElementListOfRow(int row)(Code) | | Returns the cell elements of the specified row as an element list.
Modifications performed in this list affects to the original table.
Parameters: row - the row index. the cell element list. |
insertColumnAt | public void insertColumnAt(int column, Element[] cells)(Code) | | Inserts a new column at the specified position.
If a new cell element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. This avoids
an indirect delete by DOM.
Parameters: column - index of column to insert. Parameters: cells - the cells of the new column. See Also: ElementTableFree.addColumn(Element[]) |
insertRowAt | public void insertRowAt(int row, Element elem)(Code) | | Inserts a new row element at the specified position.
If the new row element is already in the table a deep clone
(calling Node.cloneNode(boolean deep) ) is inserted. This avoids
an indirect delete by DOM.
Parameters: row - row index of the element. Parameters: elem - the new element. See Also: ElementTableFree.addRow(Element) |
setCellElementAt | public Element setCellElementAt(int row, int column, Element elem)(Code) | | Replaces the specified cell element with a new one.
If the new cell 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.
Parameters: row - row index of the cell element. Parameters: column - column index of the cell element. Parameters: elem - the new element. the element replaced. See Also: ElementTableFree.getCellElementAt(int,int) See Also: ElementTableFree.setRowAt(int,Element) |
setCellElementsOfColumn | public Element[] setCellElementsOfColumn(int column, Element[] cells)(Code) | | Replaces the specified column with a new one.
If a new cell 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.
Parameters: column - index of column to replace. Parameters: cells - the new cells of the column. the cell elements replaced. See Also: ElementTableFree.insertColumnAt(int,Element[]) See Also: ElementTableFree.getCellElementsOfColumn(int) |
setCellElementsOfRow | public Element[] setCellElementsOfRow(int row, Element[] cells)(Code) | | Clears the specified row and fills again with new elements. The number of columns of the row may change.
If a new cell 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.
Parameters: cells - new cell elements. the cell elements replaced. See Also: ElementTableFree.getCellElementsOfRow(int) |
setRowAt | public Element setRowAt(int row, Element elem)(Code) | | Replaces the specified row element with a new one.
If the new row 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.
Parameters: row - row index of the element. Parameters: elem - the new element. the element replaced. See Also: ElementTableFree.insertRowAt(int,Element) See Also: ElementTableFree.getRowElementAt(int) |
|
|