MathMatrix

Inheritance: java.lang.Object, com.aspose.slides.MathElementBase

All Implemented Interfaces: com.aspose.slides.IMathMatrix, com.aspose.slides.IHasControlCharacterProperties

public final class MathMatrix extends MathElementBase implements IMathMatrix, IHasControlCharacterProperties

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

Constructors

Constructor Description
MathMatrix(int rowCount, int columnCount) Initializes a new instance of the MathMatrix class.

Methods

Method Description
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.
get_Item(int row, int column) Element of matrix
set_Item(int row, int column, IMathElement value) Element of matrix
getControlCharacterProperties() Control Character Properties
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
getChildren() Get children elements

MathMatrix(int rowCount, int columnCount)

public MathMatrix(int rowCount, int columnCount)

Initializes a new instance of the MathMatrix class.


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

Parameters:

Parameter Type Description
rowCount int row count
columnCount int column count

getRowCount()

public final int getRowCount()

Number of rows in the matrix


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

Returns: int

getColumnCount()

public final int getColumnCount()

Number of columns in the matrix


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

Returns: int

getHidePlaceholders()

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

Returns: int

setBaseJustification(int value)

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

Parameters:

Parameter Type Description
value int

getMinColumnWidth()

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

Returns: int

setColumnGapRule(int value)

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

Parameters:

Parameter Type Description
value int

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

Returns: long

setColumnGap(long value)

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

Parameters:

Parameter Type Description
value long

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

Returns: int

setRowGapRule(int value)

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

Parameters:

Parameter Type Description
value int

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

Returns: long

setRowGap(long value)

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

Parameters:

Parameter Type Description
value long

get_Item(int row, int column)

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

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

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

getControlCharacterProperties()

public final OmmlControlCharacterPPTXUnsupportedProps getControlCharacterProperties()

Control Character Properties

Returns: com.aspose.slides.OmmlControlCharacterPPTXUnsupportedProps

getColumnAlignment(int columnIndex)

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

Parameters:

Parameter Type Description
columnIndex int Zero-based column index

Returns: int - Horizontal Alignment of specified column

setColumnAlignment(int columnIndex, int val)

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

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

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

Parameters:

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

insertRowAfter(int rowIndex)

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

Parameters:

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

deleteRow(int rowIndex)

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

Parameters:

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

insertColumnAfter(int columnIndex)

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

Parameters:

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

deleteColumn(int columnIndex)

public final 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.

getChildren()

public final IMathElement[] getChildren()

Get children elements

Returns: com.aspose.slides.IMathElement[]