org.w3c.dom.mathml
Interface MathMLMatrixElement

All Superinterfaces:
Element, MathMLContentElement, MathMLElement, Node

public interface MathMLMatrixElement
extends MathMLContentElement

The matrix element is the container element for matrixrow elements.


Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 void deleteRow(int index)
          A convenience method to delete a row.
 int getNcols()
          The number of columns in the represented matrix.
 int getNrows()
          The number of rows in the represented matrix.
 MathMLMatrixrowElement getRow(int index)
          A convenience method to retrieve a specified row.
 MathMLNodeList getRows()
          The rows of the matrix, returned as a MathMLNodeList consisting of MathMLMatrixrowElements.
 MathMLMatrixrowElement insertRow(MathMLMatrixrowElement newRow, int index)
          A convenience method to insert a row before the row that is currently the index-th row of this matrix.
 MathMLMatrixrowElement removeRow(int index)
          A convenience method to remove a row and return it to the caller.
 MathMLMatrixrowElement setRow(MathMLMatrixrowElement newRow, int index)
          A convenience method to set the value of the index-th child matrixrow element of this element.
 
Methods inherited from interface org.w3c.dom.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXref
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Method Detail

getNrows

int getNrows()
The number of rows in the represented matrix.

Returns:
value of the nrows attribute.

getNcols

int getNcols()
The number of columns in the represented matrix.

Returns:
value of the ncols attribute.

getRows

MathMLNodeList getRows()
The rows of the matrix, returned as a MathMLNodeList consisting of MathMLMatrixrowElements.

Returns:
value of the rows attribute.

getRow

MathMLMatrixrowElement getRow(int index)
                              throws DOMException
A convenience method to retrieve a specified row.

Parameters:
index - Position of the row in the list of rows. The first row is numbered 1.
Returns:
The MathMLMatrixrowElement representing the index-th row.
Throws:
DOMException - INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix.

insertRow

MathMLMatrixrowElement insertRow(MathMLMatrixrowElement newRow,
                                 int index)
                                 throws DOMException
A convenience method to insert a row before the row that is currently the index-th row of this matrix. If index is 0, newRow is appended as the last row of the matrix.

Parameters:
newRow - MathMLMatrixrowElement to be inserted into the matrix.
index - Unsigned integer giving the row position before which newRow is to be inserted. The first row is numbered 1.
Returns:
The MathMLMatrixrowElement added. This is the new element within the DOM.
Throws:
DOMException - INDEX_SIZE_ERR: Raised if index is greater than one more than the number of rows in the matrix. HIERARCHY_REQUEST_ERR: Raised if the number of cells in newRow doesn't match the number of columns in the matrix.

setRow

MathMLMatrixrowElement setRow(MathMLMatrixrowElement newRow,
                              int index)
                              throws DOMException
A convenience method to set the value of the index-th child matrixrow element of this element. If there is already a row at the specified index, it is replaced by newRow.

Parameters:
newRow - MathMLMatrixrowElement representing the matrixrow which is to become the index-th row of the matrix.
index - Unsigned integer giving the row which is to be set to newRow. The first row is numbered 1.
Returns:
The MathMLMatrixrowElement child of this MathMLMatrixrowElement representing newRow within the DOM.
Throws:
DOMException - INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix. HIERARCHY_REQUEST_ERR: Raised if the number of cells in newRow doesn't match the number of columns in the matrix.

deleteRow

void deleteRow(int index)
               throws DOMException
A convenience method to delete a row. The deletion changes the indices of the following rows.

Parameters:
index - Position of the row to be deleted in the list of rows
Throws:
DOMException - INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix.

removeRow

MathMLMatrixrowElement removeRow(int index)
                                 throws DOMException
A convenience method to remove a row and return it to the caller. The deletion changes the indices of the following rows.

Parameters:
index - Position of the row to be removed in the list of rows. The first row is numbered 1.
Returns:
The MathMLMatrixrowElement being removed.
Throws:
DOMException - INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.