com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class MathMatrix

  • All Implemented Interfaces:
    IMathElement, IMathMatrix


    public final class MathMatrix
    extends MathElementBase
    implements IMathMatrix

    Specifies the Matrix object, consisting of child elements laid out in one or more rows and columns. It is important to note that matrices do not have built in delimiters. To place the matrix in the brackets you should use the delimiter object (IMathDelimiter). Null arguments can be used to create gaps in matrices.


    Example:
     
     IMathMatrix matrix = new MathMatrix(2, 3);
     matrix.set_Item(0, 0, new MathematicalText("item.1.1"));
     
    • Constructor Detail

      • MathMatrix

        public MathMatrix(int rowCount,
                          int columnCount)

        Initializes a new instance of the MathMatrix class.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         
        Parameters:
        rowCount - row count
        columnCount - column count
    • Method Detail

      • getRowCount

        public final int getRowCount()

        Number of rows in the matrix


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         int rowCount = matrix.getRowCount();
         
        Specified by:
        getRowCount in interface IMathMatrix
      • getColumnCount

        public final int getColumnCount()

        Number of columns in the matrix


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         int columnCount = matrix.getColumnCount();
         
        Specified by:
        getColumnCount in interface IMathMatrix
      • getHidePlaceholders

        public final boolean getHidePlaceholders()

        Hide the placeholders for empty matrix elements Default: false


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setHidePlaceholders(true);
         
        Specified by:
        getHidePlaceholders in interface IMathMatrix
      • setHidePlaceholders

        public final void setHidePlaceholders(boolean value)

        Hide the placeholders for empty matrix elements Default: false


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setHidePlaceholders(true);
         
        Specified by:
        setHidePlaceholders in interface IMathMatrix
      • getBaseJustification

        public final int getBaseJustification()

        Specifies the vertical justification respect to surrounding text. Possible values are top, bottom, and center. Default: Center


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setBaseJustification(MathVerticalAlignment.Center);
         
        Specified by:
        getBaseJustification in interface IMathMatrix
      • setBaseJustification

        public final void setBaseJustification(int value)

        Specifies the vertical justification respect to surrounding text. Possible values are top, bottom, and center. Default: Center


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setBaseJustification(MathVerticalAlignment.Center);
         
        Specified by:
        setBaseJustification in interface IMathMatrix
      • getMinColumnWidth

        public final long getMinColumnWidth()

        Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as “Column Gap” or “Gap Width”) is added to the MinColumnWidth to determine the total Matrix Column Spacing (distance between the same edges of different columns). Default: 0.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setMinColumnWidth(20);
         
        Specified by:
        getMinColumnWidth in interface IMathMatrix
      • setMinColumnWidth

        public final void setMinColumnWidth(long value)

        Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as “Column Gap” or “Gap Width”) is added to the MinColumnWidth to determine the total Matrix Column Spacing (distance between the same edges of different columns). Default: 0.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setMinColumnWidth(20);
         
        Specified by:
        setMinColumnWidth in interface IMathMatrix
      • getColumnGapRule

        public final int getColumnGapRule()

        The type of horizontal spacing between columns of a matrix; Horizontal spacing units can be ems or points (stored as twips). Default: SingleSpacingGap (0)


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnGapRule(MathSpacingRules.OneAndHalfSpacingGap);
         
        Specified by:
        getColumnGapRule in interface IMathMatrix
      • setColumnGapRule

        public final void setColumnGapRule(int value)

        The type of horizontal spacing between columns of a matrix; Horizontal spacing units can be ems or points (stored as twips). Default: SingleSpacingGap (0)


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnGapRule(MathSpacingRules.OneAndHalfSpacingGap);
         
        Specified by:
        setColumnGapRule in interface IMathMatrix
      • getColumnGap

        public final long getColumnGap()

        The value of horizontal spacing between columns of a matrix; If the ColumnGapRule is set to 3 ("Exactly"), then the unit is interpreted as twips (1/20th of a point) If the ColumnGapRule is set to 4 ("Multiple"), then the unit is interpreted as number of 0.5 em increments. In other cases ignored. Default: 0


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnGapRule(MathSpacingRules.Exactly);
         matrix.setColumnGap(20);
         
        Specified by:
        getColumnGap in interface IMathMatrix
      • setColumnGap

        public final void setColumnGap(long value)

        The value of horizontal spacing between columns of a matrix; If the ColumnGapRule is set to 3 ("Exactly"), then the unit is interpreted as twips (1/20th of a point) If the ColumnGapRule is set to 4 ("Multiple"), then the unit is interpreted as number of 0.5 em increments. In other cases ignored. Default: 0


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnGapRule(MathSpacingRules.Exactly);
         matrix.setColumnGap(20);
         
        Specified by:
        setColumnGap in interface IMathMatrix
      • getRowGapRule

        public final int getRowGapRule()

        The type of vertical spacing between rows of a matrix; Vertical spacing units can be lines or points (stored as twips). Default: SingleSpacingGap (0)


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setRowGapRule(MathSpacingRules.OneAndHalfSpacingGap);
         
        Specified by:
        getRowGapRule in interface IMathMatrix
      • setRowGapRule

        public final void setRowGapRule(int value)

        The type of vertical spacing between rows of a matrix; Vertical spacing units can be lines or points (stored as twips). Default: SingleSpacingGap (0)


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setRowGapRule(MathSpacingRules.OneAndHalfSpacingGap);
         
        Specified by:
        setRowGapRule in interface IMathMatrix
      • getRowGap

        public final long getRowGap()

        The value of vertical spacing between rows of a matrix; If the RowGapRule is set to 3 ("Exactly"), then the unit is interpreted as twips (1/20th of a point) If the RowGapRule is set to 4 ("Multiple"), then the unit is interpreted as half-lines. Default: 0


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setRowGapRule(MathSpacingRules.Exactly);
         matrix.setRowGap(20);
         
        Specified by:
        getRowGap in interface IMathMatrix
      • setRowGap

        public final void setRowGap(long value)

        The value of vertical spacing between rows of a matrix; If the RowGapRule is set to 3 ("Exactly"), then the unit is interpreted as twips (1/20th of a point) If the RowGapRule is set to 4 ("Multiple"), then the unit is interpreted as half-lines. Default: 0


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setRowGapRule(MathSpacingRules.Exactly);
         matrix.setRowGap(20);
         
        Specified by:
        setRowGap in interface IMathMatrix
      • get_Item

        public final IMathElement get_Item(int row,
                                           int column)

        Element of matrix


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.set_Item(0, 0, new MathematicalText("item.1.1"));
         
        Specified by:
        get_Item in interface IMathMatrix
        Parameters:
        row - The zero-based index of the row to get item
        column - The zero-based index of the column to get item
        Returns:
        IMathElement
      • set_Item

        public final void set_Item(int row,
                                   int column,
                                   IMathElement value)

        Element of matrix


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.set_Item(0, 0, new MathematicalText("item.1.1"));
         
        Specified by:
        set_Item in interface IMathMatrix
        Parameters:
        row - The zero-based index of the row to get item
        column - The zero-based index of the column to get item
      • getColumnAlignment

        public final int getColumnAlignment(int columnIndex)

        Get the horizontal alignment of the specified column


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         MathHorizontalAlignment alignment = matrix.getColumnAlignment(0);
         
        Specified by:
        getColumnAlignment in interface IMathMatrix
        Parameters:
        columnIndex - Zero-based column index
        Returns:
        Horizontal Alignment of specified column
      • setColumnAlignment

        public final void setColumnAlignment(int columnIndex,
                                             int val)

        Set the horizontal alignment of the specified column


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnAlignment(0, MathHorizontalAlignment.Left);
         
        Specified by:
        setColumnAlignment in interface IMathMatrix
        Parameters:
        columnIndex - Zero-based column index
        val - New value of horizontal alignment of specified column
      • setColumnsAlignment

        public final void setColumnsAlignment(int columnIndex,
                                              long columnsCount,
                                              int val)

        Set the horizontal alignment of the specified columns


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.setColumnAlignment(0, 3, MathHorizontalAlignment.Left);
         
        Specified by:
        setColumnsAlignment in interface IMathMatrix
        Parameters:
        columnIndex - Zero-based index of the first column to set alignment
        columnsCount - The number of columns to specify the alignment
        val - New value of horizontal alignment of specified column
      • insertRowBefore

        public final void insertRowBefore(int rowIndex)

        Insert a new row before the specified one Initially all elements in the new row are null.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.insertRowBefore(1);
         
        Specified by:
        insertRowBefore in interface IMathMatrix
        Parameters:
        rowIndex - Index of the row before which to insert a new one
      • insertRowAfter

        public final void insertRowAfter(int rowIndex)

        Insert a new row after the specified one Initially all elements in the new row are null.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.insertRowAfter(1);
         
        Specified by:
        insertRowAfter in interface IMathMatrix
        Parameters:
        rowIndex - Index of the row after which to insert a new one
      • deleteRow

        public final void deleteRow(int rowIndex)

        Deletes the specified row


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.deleteRow(0);
         
        Specified by:
        deleteRow in interface IMathMatrix
        Parameters:
        rowIndex - The zero-based index of the row to delete.
        Throws:
        com.aspose.ms.System.InvalidOperationException - When you try to delete the last single row in the matrix
        com.aspose.ms.System.ArgumentOutOfRangeException - If rowIndex less than zero or greater or equal to the RowCount
      • insertColumnBefore

        public final void insertColumnBefore(int columnIndex)

        Insert a new column before the specified one Initially all elements in the new column are null.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.insertColumnBefore(0);
         
        Specified by:
        insertColumnBefore in interface IMathMatrix
        Parameters:
        columnIndex - Index of the column before which to insert a new one
      • insertColumnAfter

        public final void insertColumnAfter(int columnIndex)

        Insert a new column after the specified one Initially all elements in the new column are null.


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.insertColumnAfter(0);
         
        Specified by:
        insertColumnAfter in interface IMathMatrix
        Parameters:
        columnIndex - Index of the column after which to insert a new one
      • deleteColumn

        public final void deleteColumn(int columnIndex)

        Deletes the specified column


        Example:
         
         IMathMatrix matrix = new MathMatrix(2, 3);
         matrix.deleteColumn(0);
         
        Specified by:
        deleteColumn in interface IMathMatrix
        Parameters:
        columnIndex - The zero-based index of the column to delete.
        Throws:
        com.aspose.ms.System.InvalidOperationException - When you try to delete the last single column in the matrix
        com.aspose.ms.System.ArgumentOutOfRangeException - If columnIndex less than zero or greater or equal to the ColumnCount