Class AbstractTableRow

java.lang.Object
org.apache.batik.dom.AbstractNode
org.apache.batik.dom.AbstractParentNode
org.apache.batik.dom.AbstractParentChildNode
org.apache.batik.dom.AbstractElement
org.apache.batik.dom.AbstractElementNS
All Implemented Interfaces:
Serializable, JEuclidElement, JEuclidNode, LayoutableNode, org.apache.batik.dom.events.NodeEventTarget, org.apache.batik.dom.ExtendedNode, org.apache.batik.dom.xbl.NodeXBL, org.apache.batik.dom.xbl.XBLManagerData, org.apache.batik.w3c.dom.ElementTraversal, Element, EventTarget, MathMLContainer, MathMLElement, MathMLPresentationContainer, MathMLPresentationElement, MathMLTableRowElement, Node
Direct Known Subclasses:
Mlabeledtr, Mtr

public abstract class AbstractTableRow extends AbstractTableElement implements MathMLTableRowElement
Abstract class for table rows with and without label.
Version:
$Revision: bc1d5fde7b73 $
See Also:
  • Constructor Details

    • AbstractTableRow

      public AbstractTableRow(String qname, org.apache.batik.dom.AbstractDocument odoc)
      Default constructor. Sets MathML Namespace.
      Parameters:
      qname - Qualified name.
      odoc - Owner Document.
  • Method Details

    • deleteCell

      public void deleteCell(int index)
      A convenience method to delete a cell in the row.
      Specified by:
      deleteCell in interface MathMLTableRowElement
      Parameters:
      index - Index of cell to be deleted. Note that the count will differ from the index-th child node if this is a MathMLLabeledRowElement!
    • getCells

      public MathMLNodeList getCells()
      A MathMLNodeList consisting of the cells of the row. Note that this does not include the label if this is a MathMLLabeledRowElement!
      Specified by:
      getCells in interface MathMLTableRowElement
      Returns:
      value of the cells attribute.
    • insertCell

      public MathMLTableCellElement insertCell(MathMLTableCellElement newCell, int index)
      A convenience method to insert a new cell in the row.
      Specified by:
      insertCell in interface MathMLTableRowElement
      Parameters:
      newCell - A MathMLTableCellElement representing the new cell (mtd element) to be inserted.
      index - Index of the cell before which the new cell is to be inserted, where the first cell is numbered 0. If index equals the current number of cells, the new cell is appended as the last cell of the row. Note that the index will differ from the index of the corresponding Node in Node::childNodes if this is a MathMLLabeledRowElement!
      Returns:
      The MathMLTableCellElement representing the mtd element being inserted.
    • insertEmptyCell

      public MathMLTableCellElement insertEmptyCell(int index)
      A convenience method to insert a new (empty) cell in the row.
      Specified by:
      insertEmptyCell in interface MathMLTableRowElement
      Parameters:
      index - Index of the cell before which the new cell is to be inserted, where the first cell is numbered 0. If index is equal to the current number of cells, the new cell is appended as the last cell of the row. Note that the index will differ from the index of the corresponding Node in the collection returned by Node::childNodes if this is a MathMLLabeledRowElement!
      Returns:
      Returns the MathMLTableCellElement representing the mtd element being inserted.
    • setCell

      public MathMLTableCellElement setCell(MathMLTableCellElement newCell, int index)
      A convenience method to set the value of a cell in the row to newCell. If index is equal to the current number of cells, newCell is appended as the last cell in the row.
      Specified by:
      setCell in interface MathMLTableRowElement
      Parameters:
      newCell - A MathMLTableCellElement representing the cell (mtd element) that is to be inserted.
      index - Index of the cell that is to be replaced by the new cell, where the first cell is numbered 0. Note that the index will differ from the index of the corresponding Node in the collection returned by Node::childNodes if this is a MathMLLabeledRowElement!
      Returns:
      The MathMLTableCellElement child of this MathMLTableRowElement representing the new mtd element.