Package org.w3c.dom.mathml
Interface MathMLMatrixElement
-
- All Superinterfaces:
org.w3c.dom.Element,MathMLContentElement,MathMLElement,org.w3c.dom.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteRow(int index)A convenience method to delete a row.intgetNcols()The number of columns in the represented matrix.intgetNrows()The number of rows in the represented matrix.MathMLMatrixrowElementgetRow(int index)A convenience method to retrieve a specified row.MathMLNodeListgetRows()The rows of the matrix, returned as a MathMLNodeList consisting of MathMLMatrixrowElements.MathMLMatrixrowElementinsertRow(MathMLMatrixrowElement newRow, int index)A convenience method to insert a row before the row that is currently the index-th row of this matrix.MathMLMatrixrowElementremoveRow(int index)A convenience method to remove a row and return it to the caller.MathMLMatrixrowElementsetRow(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.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.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXref
-
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 org.w3c.dom.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:
org.w3c.dom.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 org.w3c.dom.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:
org.w3c.dom.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 org.w3c.dom.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:
org.w3c.dom.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 org.w3c.dom.DOMExceptionA 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:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix.
-
removeRow
MathMLMatrixrowElement removeRow(int index) throws org.w3c.dom.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:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of rows in the matrix.
-
-