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, MathMLTableElement, Node

public final class Mtable extends AbstractTableElement implements MathMLTableElement
This class presents a table.
Version:
$Revision: bc1d5fde7b73 $
See Also:
  • Field Details

  • Constructor Details

    • Mtable

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

    • newNode

      protected Node newNode()
      Overrides:
      newNode in class org.apache.batik.dom.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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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.