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 and Description |
---|
MathMatrix(int rowCount,
int columnCount)
Initializes a new instance of the MathMatrix class.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteColumn(int columnIndex)
Deletes the specified column
|
void |
deleteRow(int rowIndex)
Deletes the specified row
|
IMathElement |
get_Item(int row,
int column)
Element of matrix
|
int |
getBaseJustification()
Specifies the vertical justification respect to surrounding text.
|
int |
getColumnAlignment(int columnIndex)
Get the horizontal alignment of the specified column
|
int |
getColumnCount()
Number of columns in the matrix
|
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.
|
int |
getColumnGapRule()
The type of horizontal spacing between columns of a matrix;
Horizontal spacing units can be ems or points (stored as twips).
|
boolean |
getHidePlaceholders()
Hide the placeholders for empty matrix elements
Default: false
|
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).
|
int |
getRowCount()
Number of rows in the matrix
|
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.
|
int |
getRowGapRule()
The type of vertical spacing between rows of a matrix;
Vertical spacing units can be lines or points (stored as twips).
|
void |
insertColumnAfter(int columnIndex)
Insert a new column after the specified one
Initially all elements in the new column are null.
|
void |
insertColumnBefore(int columnIndex)
Insert a new column before the specified one
Initially all elements in the new column are null.
|
void |
insertRowAfter(int rowIndex)
Insert a new row after the specified one
Initially all elements in the new row are null.
|
void |
insertRowBefore(int rowIndex)
Insert a new row before the specified one
Initially all elements in the new row are null.
|
void |
set_Item(int row,
int column,
IMathElement value)
Element of matrix
|
void |
setBaseJustification(int value)
Specifies the vertical justification respect to surrounding text.
|
void |
setColumnAlignment(int columnIndex,
int val)
Set the horizontal alignment of the specified column
|
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.
|
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).
|
void |
setColumnsAlignment(int columnIndex,
long columnsCount,
int val)
Set the horizontal alignment of the specified columns
|
void |
setHidePlaceholders(boolean value)
Hide the placeholders for empty matrix elements
Default: false
|
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).
|
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.
|
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).
|
accent, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, divide, divide, divide, divide, enclose, enclose, function, function, getParent_Immediate, group, group, integral, integral, integral, integral, integral, join, join, nary, nary, overbar, radical, radical, setLowerLimit, setLowerLimit, setSubscript, setSubscript, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheRight, setSubSuperscriptOnTheRight, setSuperscript, setSuperscript, setUpperLimit, setUpperLimit, toBorderBox, toBorderBox, toBox, toMathArray, underbar
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accent, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, divide, divide, divide, divide, enclose, enclose, function, function, group, group, integral, integral, integral, integral, integral, join, join, nary, nary, overbar, radical, radical, setLowerLimit, setLowerLimit, setSubscript, setSubscript, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheRight, setSubSuperscriptOnTheRight, setSuperscript, setSuperscript, setUpperLimit, setUpperLimit, toBorderBox, toBorderBox, toBox, toMathArray, underbar
public MathMatrix(int rowCount, int columnCount)
Initializes a new instance of the MathMatrix class.
Example:IMathMatrix matrix = new MathMatrix(2, 3);
rowCount
- row countcolumnCount
- column countpublic final int getRowCount()
Number of rows in the matrix
Example:IMathMatrix matrix = new MathMatrix(2, 3); int rowCount = matrix.getRowCount();
getRowCount
in interface IMathMatrix
public final int getColumnCount()
Number of columns in the matrix
Example:IMathMatrix matrix = new MathMatrix(2, 3); int columnCount = matrix.getColumnCount();
getColumnCount
in interface IMathMatrix
public final boolean getHidePlaceholders()
Hide the placeholders for empty matrix elements Default: false
Example:IMathMatrix matrix = new MathMatrix(2, 3); matrix.setHidePlaceholders(true);
getHidePlaceholders
in interface IMathMatrix
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);
setHidePlaceholders
in interface IMathMatrix
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);
getBaseJustification
in interface IMathMatrix
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);
setBaseJustification
in interface IMathMatrix
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);
getMinColumnWidth
in interface IMathMatrix
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);
setMinColumnWidth
in interface IMathMatrix
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);
getColumnGapRule
in interface IMathMatrix
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);
setColumnGapRule
in interface IMathMatrix
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);
getColumnGap
in interface IMathMatrix
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);
setColumnGap
in interface IMathMatrix
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);
getRowGapRule
in interface IMathMatrix
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);
setRowGapRule
in interface IMathMatrix
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);
getRowGap
in interface IMathMatrix
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);
setRowGap
in interface IMathMatrix
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"));
get_Item
in interface IMathMatrix
row
- The zero-based index of the row to get itemcolumn
- The zero-based index of the column to get itempublic 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"));
set_Item
in interface IMathMatrix
row
- The zero-based index of the row to get itemcolumn
- The zero-based index of the column to get itempublic 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);
getColumnAlignment
in interface IMathMatrix
columnIndex
- Zero-based column indexpublic 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);
setColumnAlignment
in interface IMathMatrix
columnIndex
- Zero-based column indexval
- New value of horizontal alignment of specified columnpublic 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);
setColumnsAlignment
in interface IMathMatrix
columnIndex
- Zero-based index of the first column to set alignmentcolumnsCount
- The number of columns to specify the alignmentval
- New value of horizontal alignment of specified columnpublic 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);
insertRowBefore
in interface IMathMatrix
rowIndex
- Index of the row before which to insert a new onepublic 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);
insertRowAfter
in interface IMathMatrix
rowIndex
- Index of the row after which to insert a new onepublic final void deleteRow(int rowIndex)
Deletes the specified row
Example:IMathMatrix matrix = new MathMatrix(2, 3); matrix.deleteRow(0);
deleteRow
in interface IMathMatrix
rowIndex
- The zero-based index of the row to delete.com.aspose.ms.System.InvalidOperationException
- When you try to delete the last single row in the matrixcom.aspose.ms.System.ArgumentOutOfRangeException
- If rowIndex less than zero or greater or equal to the RowCountpublic 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);
insertColumnBefore
in interface IMathMatrix
columnIndex
- Index of the column before which to insert a new onepublic 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);
insertColumnAfter
in interface IMathMatrix
columnIndex
- Index of the column after which to insert a new onepublic final void deleteColumn(int columnIndex)
Deletes the specified column
Example:IMathMatrix matrix = new MathMatrix(2, 3); matrix.deleteColumn(0);
deleteColumn
in interface IMathMatrix
columnIndex
- The zero-based index of the column to delete.com.aspose.ms.System.InvalidOperationException
- When you try to delete the last single column in the matrixcom.aspose.ms.System.ArgumentOutOfRangeException
- If columnIndex less than zero or greater or equal to the ColumnCountCopyright © 2004-2021 Aspose Pty Ltd. All Rights Reserved.