IMathMatrix

All Implemented Interfaces: com.aspose.slides.IMathElement

public interface IMathMatrix extends IMathElement

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"));

Methods

Method Description
get_Item(int row, int column) Elements of matrix
set_Item(int row, int column, IMathElement value) Elements of matrix
getRowCount() Number of rows in the matrix
getColumnCount() Number of columns in the matrix
getHidePlaceholders() Hide the placeholders for empty matrix elements Default: false
setHidePlaceholders(boolean value) Hide the placeholders for empty matrix elements Default: false
getBaseJustification() Specifies the vertical justification respect to surrounding text.
setBaseJustification(int value) Specifies the vertical justification respect to surrounding text.
getMinColumnWidth() Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as \u201cColumn Gap\u201d or \u201cGap Width\u201d) is added to the MinColumnWidth to determine the total Matrix Column Spacing (distance between the same edges of different columns).
setMinColumnWidth(long value) Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as \u201cColumn Gap\u201d or \u201cGap Width\u201d) is added to the MinColumnWidth to determine the total Matrix Column Spacing (distance between the same edges of different columns).
getColumnGapRule() The type of horizontal spacing between columns of a matrix; Horizontal spacing units can be ems or points (stored as twips).
setColumnGapRule(int value) The type of horizontal spacing between columns of a matrix; Horizontal spacing units can be ems or points (stored as twips).
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.
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.
getRowGapRule() The type of vertical spacing between rows of a matrix; Vertical spacing units can be lines or points (stored as twips).
setRowGapRule(int value) The type of vertical spacing between rows of a matrix; Vertical spacing units can be lines or points (stored as twips).
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.
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.
getColumnAlignment(int columnIndex) Get the horizontal alignment of the specified column
setColumnAlignment(int columnIndex, int val) Set the horizontal alignment of the specified column
setColumnsAlignment(int columnIndex, long columnsCount, int val) Set the horizontal alignment of the specified columns
insertRowBefore(int rowIndex) Insert a new row before the specified one Initially all elements in the new row are null.
insertRowAfter(int rowIndex) Insert a new row after the specified one Initially all elements in the new row are null.
deleteRow(int rowIndex) Deletes the specified row
insertColumnBefore(int columnIndex) Insert a new column before the specified one Initially all elements in the new column are null.
insertColumnAfter(int columnIndex) Insert a new column after the specified one Initially all elements in the new column are null.
deleteColumn(int columnIndex) Deletes the specified column

get_Item(int row, int column)

public abstract IMathElement get_Item(int row, int column)

Elements of matrix


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

Parameters:

Parameter Type Description
row int The zero-based index of the row to get item
column int The zero-based index of the column to get item

Returns: IMathElement - IMathElement

set_Item(int row, int column, IMathElement value)

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

Elements of matrix


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

Parameters:

Parameter Type Description
row int The zero-based index of the row to get item
column int The zero-based index of the column to get item
value IMathElement

getRowCount()

public abstract int getRowCount()

Number of rows in the matrix


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 int rowCount = matrix.getRowCount();

Returns: int

getColumnCount()

public abstract int getColumnCount()

Number of columns in the matrix


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 int columnCount = matrix.getColumnCount();

Returns: int

getHidePlaceholders()

public abstract boolean getHidePlaceholders()

Hide the placeholders for empty matrix elements Default: false


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 matrix.setHidePlaceholders(true);

Returns: boolean

setHidePlaceholders(boolean value)

public abstract void setHidePlaceholders(boolean value)

Hide the placeholders for empty matrix elements Default: false


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 matrix.setHidePlaceholders(true);

Parameters:

Parameter Type Description
value boolean

getBaseJustification()

public abstract 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);

Returns: int

setBaseJustification(int value)

public abstract 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);

Parameters:

Parameter Type Description
value int

getMinColumnWidth()

public abstract long getMinColumnWidth()

Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as \u201cColumn Gap\u201d or \u201cGap Width\u201d) 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);

Returns: long

setMinColumnWidth(long value)

public abstract void setMinColumnWidth(long value)

Minimum column width in twips (1/20th of a point) The gap spacing (also referred to as \u201cColumn Gap\u201d or \u201cGap Width\u201d) 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);

Parameters:

Parameter Type Description
value long

getColumnGapRule()

public abstract 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);

Returns: int

setColumnGapRule(int value)

public abstract 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);

Parameters:

Parameter Type Description
value int

getColumnGap()

public abstract 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);

Returns: long

setColumnGap(long value)

public abstract 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);

Parameters:

Parameter Type Description
value long

getRowGapRule()

public abstract 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);

Returns: int

setRowGapRule(int value)

public abstract 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);

Parameters:

Parameter Type Description
value int

getRowGap()

public abstract 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);

Returns: long

setRowGap(long value)

public abstract 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);

Parameters:

Parameter Type Description
value long

getColumnAlignment(int columnIndex)

public abstract int getColumnAlignment(int columnIndex)

Get the horizontal alignment of the specified column


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 MathHorizontalAlignment alignment = matrix.getColumnAlignment(0);

Parameters:

Parameter Type Description
columnIndex int Zero-based column index

Returns: int - Horizontal Alignment of specified column

setColumnAlignment(int columnIndex, int val)

public abstract 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);

Parameters:

Parameter Type Description
columnIndex int Zero-based column index
val int New value of horizontal alignment of specified column

setColumnsAlignment(int columnIndex, long columnsCount, int val)

public abstract 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);

Parameters:

Parameter Type Description
columnIndex int Zero-based index of the first column to set alignment
columnsCount long The number of columns to specify the alignment
val int New value of horizontal alignment of specified column

insertRowBefore(int rowIndex)

public abstract 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);

Parameters:

Parameter Type Description
rowIndex int Index of the row before which to insert a new one

insertRowAfter(int rowIndex)

public abstract 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);

Parameters:

Parameter Type Description
rowIndex int Index of the row after which to insert a new one

deleteRow(int rowIndex)

public abstract void deleteRow(int rowIndex)

Deletes the specified row


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 matrix.deleteRow(0);

Parameters:

Parameter Type Description
rowIndex int The zero-based index of the row to delete.

insertColumnBefore(int columnIndex)

public abstract 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);

Parameters:

Parameter Type Description
columnIndex int Index of the column before which to insert a new one

insertColumnAfter(int columnIndex)

public abstract 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);

Parameters:

Parameter Type Description
columnIndex int Index of the column after which to insert a new one

deleteColumn(int columnIndex)

public abstract void deleteColumn(int columnIndex)

Deletes the specified column


Example:
 
 IMathMatrix matrix = new MathMatrix(2, 3);
 matrix.deleteColumn(0);

Parameters:

Parameter Type Description
columnIndex int The zero-based index of the column to delete.