Class Mtable

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Mtable.LineType
      Class for line types.
      • Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractElement

        org.apache.batik.dom.AbstractElement.ElementTypeInfo, org.apache.batik.dom.AbstractElement.Entry, org.apache.batik.dom.AbstractElement.NamedNodeHashMap
      • Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode

        org.apache.batik.dom.AbstractParentNode.ChildNodes, org.apache.batik.dom.AbstractParentNode.ElementsByTagName, org.apache.batik.dom.AbstractParentNode.ElementsByTagNameNS
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENT
      The XML element from this class.
      • 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

      Constructors 
      Constructor Description
      Mtable​(java.lang.String qname, org.apache.batik.dom.AbstractDocument odoc)
      Default constructor.
    • Field Detail

      • ELEMENT

        public static final java.lang.String ELEMENT
        The XML element from this class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Mtable

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

      • newNode

        protected org.w3c.dom.Node newNode()
        Overrides:
        newNode in class org.apache.batik.dom.GenericElementNS
      • getRowlines

        public java.lang.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.
      • getColumnlines

        public java.lang.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.
      • getColumnwidth

        public java.lang.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.
      • getWidth

        public java.lang.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.
      • getAlign

        public java.lang.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.
      • getAlignmentscope

        public java.lang.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.
      • getRowspacing

        public java.lang.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.
      • getColumnspacing

        public java.lang.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.
      • getFrame

        public java.lang.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.
      • getFramespacing

        public java.lang.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.
      • getEqualrows

        public java.lang.String getEqualrows()
        A string with the values true or false.
        Specified by:
        getEqualrows in interface MathMLTableElement
        Returns:
        value of the equalrows attribute.
      • getEqualcolumns

        public java.lang.String getEqualcolumns()
        A string with the values true or false.
        Specified by:
        getEqualcolumns in interface MathMLTableElement
        Returns:
        value of the equalcolumns attribute.
      • getDisplaystyle

        public java.lang.String getDisplaystyle()
        A string with the values true or false.
        Specified by:
        getDisplaystyle in interface MathMLTableElement
        Returns:
        value of the displaystyle attribute.
      • getSide

        public java.lang.String getSide()
        A string with the values left, right, leftoverlap, or rightoverlap.
        Specified by:
        getSide in interface MathMLTableElement
        Returns:
        value of the side attribute.
      • getMinlabelspacing

        public java.lang.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.
      • 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.
      • deleteRow

        public void deleteRow​(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.