net.sourceforge.jeuclid.elements.presentation.table
Class Mtable

java.lang.Object
  extended by org.apache.batik.dom.AbstractNode
      extended by org.apache.batik.dom.AbstractParentNode
          extended by org.apache.batik.dom.AbstractParentChildNode
              extended by org.apache.batik.dom.AbstractElement
                  extended by org.apache.batik.dom.AbstractElementNS
                      extended by org.apache.batik.dom.GenericElementNS
                          extended by net.sourceforge.jeuclid.elements.AbstractJEuclidElement
                              extended by net.sourceforge.jeuclid.elements.presentation.AbstractContainer
                                  extended by net.sourceforge.jeuclid.elements.presentation.table.AbstractTableElement
                                      extended by net.sourceforge.jeuclid.elements.presentation.table.Mtable
All Implemented Interfaces:
Serializable, JEuclidElement, JEuclidNode, LayoutableNode, NodeEventTarget, ExtendedNode, NodeXBL, XBLManagerData, Element, ElementTraversal, EventTarget, MathMLContainer, MathMLElement, MathMLPresentationContainer, MathMLPresentationElement, MathMLTableElement, Node

public final class Mtable
extends AbstractTableElement
implements MathMLTableElement

This class presents a table.

Version:
$Revision: bc1d5fde7b73 $
See Also:
Serialized Form

Nested Class Summary
static class Mtable.LineType
          Class for line types.
 
Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractElement
AbstractElement.ElementTypeInfo, AbstractElement.Entry, AbstractElement.NamedNodeHashMap
 
Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS
 
Field Summary
static String ELEMENT
          The XML element from this class.
 
Fields inherited from class net.sourceforge.jeuclid.elements.AbstractJEuclidElement
ATTR_CLASS, ATTR_DEPRECATED_BACKGROUND, ATTR_DEPRECATED_COLOR, ATTR_DEPRECATED_FONTFAMILY, ATTR_DEPRECATED_FONTSIZE, ATTR_DEPRECATED_FONTSTYLE, ATTR_DEPRECATED_FONTWEIGHT, ATTR_HREF, ATTR_ID, ATTR_MATHBACKGROUND, ATTR_MATHCOLOR, ATTR_MATHSIZE, ATTR_MATHVARIANT, ATTR_STYLE, ATTR_XREF, TRIVIAL_SPACE_MAX, URI
 
Fields inherited from class org.apache.batik.dom.GenericElementNS
nodeName, readonly
 
Fields inherited from class org.apache.batik.dom.AbstractElementNS
namespaceURI
 
Fields inherited from class org.apache.batik.dom.AbstractElement
attributes, typeInfo
 
Fields inherited from class org.apache.batik.dom.AbstractParentChildNode
nextSibling, parentNode, previousSibling
 
Fields inherited from class org.apache.batik.dom.AbstractParentNode
childNodes
 
Fields inherited from class org.apache.batik.dom.AbstractNode
DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EMPTY_NODE_LIST, eventSupport, managerData, ownerDocument, userData, userDataHandlers
 
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
 
Constructor Summary
Mtable(String qname, AbstractDocument odoc)
          Default constructor.
 
Method Summary
 void deleteRow(int index)
          
 void deleteRow(long index)
          A convenience method to delete the row of the table at the specified index.
 String getAlign()
          A string representing the vertical alignment of the table with the adjacent text.
 String getAlignmentscope()
          A string consisting of the values true or false indicating, for each column, whether it can be used as an alignment scope.
 LayoutContext getChildLayoutContext(int childNum, LayoutContext context)
          get the layout context for the given child.
 String getColumnlines()
          A string specifying whether and what kind of lines should be added between each column.
 String getColumnspacing()
          A string consisting of a space-separated sequence of specifiers of the form number h-unit representing the space to be added between columns.
 String getColumnwidth()
          A string consisting of a space-separated sequence of specifiers, each of which can have one of the following forms: auto, number h-unit, namedspace, or fit.
 String getDisplaystyle()
          A string with the values true or false.
 String getEqualcolumns()
          A string with the values true or false.
 String getEqualrows()
          A string with the values true or false.
 String getFrame()
          A string specifying a frame around the table.
 String getFramespacing()
          A string of the form number h-unit number v-unit specifying the spacing between table and its frame.
 String getMinlabelspacing()
          A string of the form number h-unit, specifying the minimum space between a label and the adjacent entry in the labeled row.
 MathMLTableRowElement getRow(int index)
          
 MathMLTableRowElement getRow(long index)
          A convenience method to retrieve the index-th row from the table.
 String getRowlines()
          A string specifying whether and what kind of lines should be added between each row.
 MathMLNodeList getRows()
          A MathMLNodeList consisting of MathMLTableRowElements and MathMLLabeledRowElements representing the rows of the table.
 String getRowspacing()
          A string consisting of a space-separated sequence of specifiers of the form number v-unit representing the space to be added between rows.
 String getSide()
          A string with the values left, right, leftoverlap, or rightoverlap.
 String getWidth()
          A string that is either of the form number h-unit or is the string auto.
 MathMLLabeledRowElement insertEmptyLabeledRow(int index)
          
 MathMLLabeledRowElement insertEmptyLabeledRow(long index)
          A convenience method to insert a new (empty) labeled row (mlabeledtr) in the table before the current index-th row.
 MathMLTableRowElement insertEmptyRow(int index)
          
 MathMLTableRowElement insertEmptyRow(long index)
          A convenience method to insert a new (empty) row (mtr) in the table before the current index-th row.
 MathMLTableRowElement insertRow(int index, MathMLTableRowElement newRow)
          
 MathMLTableRowElement insertRow(long index, MathMLTableRowElement newRow)
          A convenience method to insert the new row or labeled row (mtr or mlabeledtr) represented by newRow in the table before the current index-th row.
 void layoutStageInvariant(LayoutView view, LayoutInfo info, LayoutStage stage, LayoutContext context)
          Layout for elements which are stage independent.
protected  Node newNode()
          
 MathMLTableRowElement removeRow(int index)
          
 MathMLTableRowElement removeRow(long index)
          A convenience method to delete the row of the table at the specified index and return it to the caller.
 void setAlign(String align)
          setter for the align attribute.
 void setAlignmentscope(String alignmentscope)
          setter for the alignmentscope attribute.
 void setColumnlines(String columnlines)
          setter for the columnlines attribute.
 void setColumnspacing(String columnspacing)
          setter for the columnspacing attribute.
 void setColumnwidth(String columnwidth)
          setter for the columnwidth attribute.
 void setDisplaystyle(String displaystyle)
          setter for the displaystyle attribute.
 void setEqualcolumns(String equalcolumns)
          setter for the equalcolumns attribute.
 void setEqualrows(String equalrows)
          setter for the equalrows attribute.
 void setFrame(String frame)
          setter for the frame attribute.
 void setFramespacing(String framespacing)
          setter for the framespacing attribute.
 void setMinlabelspacing(String minlabelspacing)
          setter for the minlabelspacing attribute.
 MathMLTableRowElement setRow(int index, MathMLTableRowElement newRow)
          
 MathMLTableRowElement setRow(long index, MathMLTableRowElement newRow)
          A method to set the value of the row in the table at the specified index to the mtr or mlabeledtr represented by newRow.
 void setRowlines(String rowlines)
          setter for the rowlines attribute.
 void setRowspacing(String rowspacing)
          setter for the rowspacing attribute.
 void setSide(String side)
          setter for the side attribute.
 void setWidth(String width)
          setter for the width attribute.
 
Methods inherited from class net.sourceforge.jeuclid.elements.presentation.table.AbstractTableElement
getColumnalign, getGroupalign, getRowalign, setColumnalign, setGroupalign, setRowalign
 
Methods inherited from class net.sourceforge.jeuclid.elements.presentation.AbstractContainer
deleteArgument, deleteDeclaration, getArgument, getArguments, getDeclaration, getDeclarations, getNArguments, insertArgument, insertDeclaration, removeArgument, removeDeclaration, setArgument, setDeclaration
 
Methods inherited from class net.sourceforge.jeuclid.elements.AbstractJEuclidElement
addMathElement, applyLocalAttributesToContext, changeHook, dispatchEvent, getChildrenToDraw, getChildrenToLayout, getClassName, getContents, getFont, getFontMetrics, getHref, getId, getIndexOfMathElement, getMathAttribute, getMathAttribute, getMathbackground, getMathcolor, getMathElement, getMathElementCount, getMathElementStyle, getMathsize, getMathvariant, getMathvariantAsVariant, getMiddleShift, getOwnerMathElement, getParent, getText, getXref, hasChildPostscripts, hasChildPrescripts, layoutStage1, layoutStage2, setClassName, setDefaultMathAttribute, setFakeParent, setHref, setId, setMathbackground, setMathcolor, setMathElement, setMathElementStyle, setMathsize, setMathvariant, setXref
 
Methods inherited from class org.apache.batik.dom.GenericElementNS
copyInto, deepCopyInto, deepExport, export, getNodeName, isReadonly, setNodeName, setReadonly
 
Methods inherited from class org.apache.batik.dom.AbstractElementNS
getNamespaceURI
 
Methods inherited from class org.apache.batik.dom.AbstractElement
attrAdded, attrModified, attrRemoved, checkChildType, createAttributes, fireDOMAttrModifiedEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildElementCount, getFirstElementChild, getIdAttribute, getLastElementChild, getNextElementSibling, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, nodeAdded, nodeToBeRemoved, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from class org.apache.batik.dom.AbstractParentChildNode
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setParentNode, setPreviousSibling
 
Methods inherited from class org.apache.batik.dom.AbstractParentNode
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChild
 
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, addEventListenerNS, cloneNode, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getBaseURI, getBaseURI, getCascadedXMLBase, getCurrentDocument, getEventSupport, getFeature, getLocalName, getManagerData, getNodeValue, getOwnerDocument, getParentNodeEventTarget, getPrefix, getUserData, getXblBoundElement, getXblChildNodes, getXblDefinitions, getXblFirstChild, getXblFirstElementChild, getXblLastChild, getXblLastElementChild, getXblNextElementSibling, getXblNextSibling, getXblParentNode, getXblPreviousElementSibling, getXblPreviousSibling, getXblScopedChildNodes, getXblShadowTree, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, removeEventListener, removeEventListenerNS, setManagerData, setNodeValue, setOwnerDocument, setPrefix, setSpecified, setTextContent, setUserData, willTriggerNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.mathml.MathMLTableElement
getColumnalign, getGroupalign, getRowalign, setColumnalign, setGroupalign, setRowalign
 
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
 

Field Detail

ELEMENT

public static final String ELEMENT
The XML element from this class.

See Also:
Constant Field Values
Constructor Detail

Mtable

public Mtable(String qname,
              AbstractDocument odoc)
Default constructor. Sets MathML Namespace.

Parameters:
qname - Qualified name.
odoc - Owner Document.
Method Detail

newNode

protected Node newNode()

Overrides:
newNode in class GenericElementNS

getChildLayoutContext

public LayoutContext getChildLayoutContext(int childNum,
                                           LayoutContext context)
get the layout context for the given child.

Specified by:
getChildLayoutContext in interface JEuclidNode
Overrides:
getChildLayoutContext in class AbstractJEuclidElement
Parameters:
childNum - 0-based number of the child to check.
context - external context.
Returns:
layout context to use.

getRowlines

public String getRowlines()
A string specifying whether and what kind of lines should be added between each row. The string consists of a space-separated sequence of specifiers, each of which can have the following values: none, solid, or dashed.

Specified by:
getRowlines in interface MathMLTableElement
Returns:
value of the rowlines attribute.

setRowlines

public void setRowlines(String rowlines)
setter for the rowlines attribute.

Specified by:
setRowlines in interface MathMLTableElement
Parameters:
rowlines - new value for rowlines.
See Also:
MathMLTableElement.getRowlines()

getColumnlines

public String getColumnlines()
A string specifying whether and what kind of lines should be added between each column. The string consists of a space-separated sequence of specifiers, each of which can have the following values: none, solid, or dashed.

Specified by:
getColumnlines in interface MathMLTableElement
Returns:
value of the columnlines attribute.

setColumnlines

public void setColumnlines(String columnlines)
setter for the columnlines attribute.

Specified by:
setColumnlines in interface MathMLTableElement
Parameters:
columnlines - new value for columnlines.
See Also:
MathMLTableElement.getColumnlines()

getColumnwidth

public String getColumnwidth()
A string consisting of a space-separated sequence of specifiers, each of which can have one of the following forms: auto, number h-unit, namedspace, or fit. (A value of the form namedspace is one of veryverythinmathspace, verythinmathspace, thinmathspace, mediummathspace, thickmathspace, verythickmathspace, or veryverythickmathspace.) This represents the element's columnwidth attribute.

Specified by:
getColumnwidth in interface MathMLTableElement
Returns:
value of the columnwidth attribute.

setColumnwidth

public void setColumnwidth(String columnwidth)
setter for the columnwidth attribute.

Specified by:
setColumnwidth in interface MathMLTableElement
Parameters:
columnwidth - new value for columnwidth.
See Also:
MathMLTableElement.getColumnwidth()

getWidth

public String getWidth()
A string that is either of the form number h-unit or is the string auto. This represents the element's width attribute.

Specified by:
getWidth in interface MathMLTableElement
Returns:
value of the width attribute.

setWidth

public void setWidth(String width)
setter for the width attribute.

Specified by:
setWidth in interface MathMLTableElement
Parameters:
width - new value for width.
See Also:
MathMLTableElement.getWidth()

getAlign

public String getAlign()
A string representing the vertical alignment of the table with the adjacent text. Allowed values are (top | bottom | center | baseline | axis)[rownumber], where rownumber is between 1 and n (for a table with n rows) or -1 and -n.

Specified by:
getAlign in interface MathMLTableElement
Returns:
value of the align attribute.

setAlign

public void setAlign(String align)
setter for the align attribute.

Specified by:
setAlign in interface MathMLTableElement
Parameters:
align - new value for align.
See Also:
MathMLTableElement.getAlign()

getAlignmentscope

public String getAlignmentscope()
A string consisting of the values true or false indicating, for each column, whether it can be used as an alignment scope.

Specified by:
getAlignmentscope in interface MathMLTableElement
Returns:
value of the alignmentscope attribute.

setAlignmentscope

public void setAlignmentscope(String alignmentscope)
setter for the alignmentscope attribute.

Specified by:
setAlignmentscope in interface MathMLTableElement
Parameters:
alignmentscope - new value for alignmentscope.
See Also:
MathMLTableElement.getAlignmentscope()

getRowspacing

public String getRowspacing()
A string consisting of a space-separated sequence of specifiers of the form number v-unit representing the space to be added between rows.

Specified by:
getRowspacing in interface MathMLTableElement
Returns:
value of the rowspacing attribute.

setRowspacing

public void setRowspacing(String rowspacing)
setter for the rowspacing attribute.

Specified by:
setRowspacing in interface MathMLTableElement
Parameters:
rowspacing - new value for rowspacing.
See Also:
MathMLTableElement.getRowspacing()

getColumnspacing

public String getColumnspacing()
A string consisting of a space-separated sequence of specifiers of the form number h-unit representing the space to be added between columns.

Specified by:
getColumnspacing in interface MathMLTableElement
Returns:
value of the columnspacing attribute.

setColumnspacing

public void setColumnspacing(String columnspacing)
setter for the columnspacing attribute.

Specified by:
setColumnspacing in interface MathMLTableElement
Parameters:
columnspacing - new value for columnspacing.
See Also:
MathMLTableElement.getColumnspacing()

getFrame

public String getFrame()
A string specifying a frame around the table. Allowed values are (none | solid | dashed).

Specified by:
getFrame in interface MathMLTableElement
Returns:
value of the frame attribute.

setFrame

public void setFrame(String frame)
setter for the frame attribute.

Specified by:
setFrame in interface MathMLTableElement
Parameters:
frame - new value for frame.
See Also:
MathMLTableElement.getFrame()

getFramespacing

public String getFramespacing()
A string of the form number h-unit number v-unit specifying the spacing between table and its frame.

Specified by:
getFramespacing in interface MathMLTableElement
Returns:
value of the framespacing attribute.

setFramespacing

public void setFramespacing(String framespacing)
setter for the framespacing attribute.

Specified by:
setFramespacing in interface MathMLTableElement
Parameters:
framespacing - new value for framespacing.
See Also:
MathMLTableElement.getFramespacing()

getEqualrows

public String getEqualrows()
A string with the values true or false.

Specified by:
getEqualrows in interface MathMLTableElement
Returns:
value of the equalrows attribute.

setEqualrows

public void setEqualrows(String equalrows)
setter for the equalrows attribute.

Specified by:
setEqualrows in interface MathMLTableElement
Parameters:
equalrows - new value for equalrows.
See Also:
MathMLTableElement.getEqualrows()

getEqualcolumns

public String getEqualcolumns()
A string with the values true or false.

Specified by:
getEqualcolumns in interface MathMLTableElement
Returns:
value of the equalcolumns attribute.

setEqualcolumns

public void setEqualcolumns(String equalcolumns)
setter for the equalcolumns attribute.

Specified by:
setEqualcolumns in interface MathMLTableElement
Parameters:
equalcolumns - new value for equalcolumns.
See Also:
MathMLTableElement.getEqualcolumns()

getDisplaystyle

public String getDisplaystyle()
A string with the values true or false.

Specified by:
getDisplaystyle in interface MathMLTableElement
Returns:
value of the displaystyle attribute.

setDisplaystyle

public void setDisplaystyle(String displaystyle)
setter for the displaystyle attribute.

Specified by:
setDisplaystyle in interface MathMLTableElement
Parameters:
displaystyle - new value for displaystyle.
See Also:
MathMLTableElement.getDisplaystyle()

getSide

public String getSide()
A string with the values left, right, leftoverlap, or rightoverlap.

Specified by:
getSide in interface MathMLTableElement
Returns:
value of the side attribute.

setSide

public void setSide(String side)
setter for the side attribute.

Specified by:
setSide in interface MathMLTableElement
Parameters:
side - new value for side.
See Also:
MathMLTableElement.getSide()

getMinlabelspacing

public String getMinlabelspacing()
A string of the form number h-unit, specifying the minimum space between a label and the adjacent entry in the labeled row.

Specified by:
getMinlabelspacing in interface MathMLTableElement
Returns:
value of the minlabelspacing attribute.

setMinlabelspacing

public void setMinlabelspacing(String minlabelspacing)
setter for the minlabelspacing attribute.

Specified by:
setMinlabelspacing in interface MathMLTableElement
Parameters:
minlabelspacing - new value for minlabelspacing.
See Also:
MathMLTableElement.getMinlabelspacing()

getRows

public MathMLNodeList getRows()
A MathMLNodeList consisting of MathMLTableRowElements and MathMLLabeledRowElements representing the rows of the table. This is a live object.

Specified by:
getRows in interface MathMLTableElement
Returns:
value of the rows attribute.

insertEmptyRow

public MathMLTableRowElement insertEmptyRow(int index)


insertEmptyLabeledRow

public MathMLLabeledRowElement insertEmptyLabeledRow(int index)


getRow

public MathMLTableRowElement getRow(int index)


insertRow

public MathMLTableRowElement insertRow(int index,
                                       MathMLTableRowElement newRow)


setRow

public MathMLTableRowElement setRow(int index,
                                    MathMLTableRowElement newRow)


deleteRow

public void deleteRow(int index)


removeRow

public MathMLTableRowElement removeRow(int index)


deleteRow

public void deleteRow(long index)
A convenience method to delete the row of the table at the specified index. If index is less than 0, the -index-th row from the bottom of the table is deleted. (So, for instance, if index is -2, the next-to-last row is deleted.)

Specified by:
deleteRow in interface MathMLTableElement
Parameters:
index - Index of row to be deleted, where 0 represents the first row.

getRow

public MathMLTableRowElement getRow(long index)
A convenience method to retrieve the index-th row from the table. If index is less than 0, the -index-th row from the bottom of the table is retrieved. (So, for instance, if index is -2, the next-to-last row is retrieved.) If index is not a valid value (i.e. is greater than or equal to the number of rows, or is less than minus the number of rows), a null MathMLTableRowElement is returned.

Specified by:
getRow in interface MathMLTableElement
Parameters:
index - Index of the row to be returned, where 0 represents the first row. Negative numbers are used to count backwards from the last row.
Returns:
Returns the MathMLTableRowElement representing the index-th row of the table.

insertEmptyLabeledRow

public MathMLLabeledRowElement insertEmptyLabeledRow(long index)
A convenience method to insert a new (empty) labeled row (mlabeledtr) in the table before the current index-th row. If index is less than 0, the new row is inserted before the -index-th row counting up from the current last row; if index is equal to the current number of rows, the new row is appended as the last row.

Specified by:
insertEmptyLabeledRow in interface MathMLTableElement
Parameters:
index - Position before which to insert the new row, where 0 represents the first row. Negative numbers are used to count backwards from the last row.
Returns:
Returns the MathMLLabeledRowElement child of this MathMLTableElement representing the mtr element being inserted.

insertEmptyRow

public MathMLTableRowElement insertEmptyRow(long index)
A convenience method to insert a new (empty) row (mtr) in the table before the current index-th row. If index is less than 0, the new row is inserted before the -index-th row counting up from the current last row; if index is equal to the current number of rows, the new row is appended as the last row.

Specified by:
insertEmptyRow in interface MathMLTableElement
Parameters:
index - Position before which to insert the new row, where 0 represents the first row. Negative numbers are used to count backwards from the last row.
Returns:
Returns the MathMLTableRowElement child of this MathMLTableElement that represents the new mtr element being inserted.

insertRow

public MathMLTableRowElement insertRow(long index,
                                       MathMLTableRowElement newRow)
A convenience method to insert the new row or labeled row (mtr or mlabeledtr) represented by newRow in the table before the current index-th row. If index is equal to the current number of rows, newRow is appended as the last row in the table. If index is less than 0, the new row is inserted before the -index-th row from the bottom of the table. (So, for instance, if index is -2, the new row is inserted before the next-to-last current row.)

Specified by:
insertRow in interface MathMLTableElement
Parameters:
index - Index before which to insert newRow, where 0 represents the first row. Negative numbers are used to count backwards from the current last row.
newRow - A MathMLTableRowElement or MathMLLabeledRowElement representing the row to be inserted.
Returns:
The MathMLTableRowElement or MathMLLabeledRowElement child of this MathMLTableElement representing the mtr element being inserted.

removeRow

public MathMLTableRowElement removeRow(long index)
A convenience method to delete the row of the table at the specified index and return it to the caller. If index is less than 0, the -index-th row from the bottom of the table is deleted. (So, for instance, if index is -2, the next-to-last row is deleted.)

Specified by:
removeRow in interface MathMLTableElement
Parameters:
index - Index of row to be removed, where 0 represents the first row.
Returns:
A MathMLTableRowElement representing the row being deleted.

setRow

public MathMLTableRowElement setRow(long index,
                                    MathMLTableRowElement newRow)
A method to set the value of the row in the table at the specified index to the mtr or mlabeledtr represented by newRow. If index is less than 0, the -index-th row counting up from the last is replaced by newRow; if index is one more than the current number of rows, the new row is appended as the last row in the table.

Specified by:
setRow in interface MathMLTableElement
Parameters:
index - Index of the row to be set to newRow, where 0 represents the first row. Negative numbers are used to count backwards from the last row.
newRow - A MathMLTableRowElement representing the row that is to be the new index-th row.
Returns:
Returns the MathMLTableRowElement or MathMLLabeledRowElement child of this element that represents the new row in the DOM.

layoutStageInvariant

public void layoutStageInvariant(LayoutView view,
                                 LayoutInfo info,
                                 LayoutStage stage,
                                 LayoutContext context)
Layout for elements which are stage independent.

This function will layout an element which is layed out the same no matter what stage it is in. This is the case for most elements.

Notable exceptions are mo and tables.

Overrides:
layoutStageInvariant in class AbstractJEuclidElement
Parameters:
view - View Object for this layout.
info - An info object which will be filled during layout.
stage - current layout stage.
context - current LayoutContext.


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