MathematicalText

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

All Implemented Interfaces: com.aspose.slides.IMathematicalText

public final class MathematicalText extends MathElementBase implements IMathematicalText

Mathematical text


Example:
 
 MathematicalText mathText = new MathematicalText("x+y");

Constructors

ConstructorDescription
MathematicalText()Default constructor (create String.Empty Value)
MathematicalText(char mathSymbol)Create MathText with single symbol
MathematicalText(String mathText)Create MathematicalText from text
MathematicalText(String mathText, IPortionFormat portionFormat)Create MathematicalText from text and format settings

Methods

MethodDescription
getValue()Text value
setValue(String value)Text value
getFormat()Text formatting properties
getChildren()Get children elements

MathematicalText()

public MathematicalText()

Default constructor (create String.Empty Value)


Example:
 
 MathematicalText mathText = new MathematicalText();

MathematicalText(char mathSymbol)

public MathematicalText(char mathSymbol)

Create MathText with single symbol


Example:
 
 MathematicalText mathText = new MathematicalText('$');

Parameters:

ParameterTypeDescription
mathSymbolcharsingle symbol

MathematicalText(String mathText)

public MathematicalText(String mathText)

Create MathematicalText from text


Example:
 
 MathematicalText mathText = new MathematicalText("x+y");

Parameters:

ParameterTypeDescription
mathTextjava.lang.Stringtext value

MathematicalText(String mathText, IPortionFormat portionFormat)

public MathematicalText(String mathText, IPortionFormat portionFormat)

Create MathematicalText from text and format settings


Example:
 
 IPortionFormat format = new PortionFormat();
 format.setFontHeight(12);
 MathematicalText mathText = new MathematicalText("x+y", format);

Parameters:

ParameterTypeDescription
mathTextjava.lang.Stringtext value
portionFormatIPortionFormattext format settings

getValue()

public final String getValue()

Text value


Example:
 
 IMathematicalText mathText = new MathematicalText("x+y");
 String textValue = mathText.getValue();

Returns: java.lang.String

setValue(String value)

public final void setValue(String value)

Text value


Example:
 
 IMathematicalText mathText = new MathematicalText("x+y");
 String textValue = mathText.getValue();

Parameters:

ParameterTypeDescription
valuejava.lang.String

getFormat()

public final IPortionFormat getFormat()

Text formatting properties


Example:
 
 IMathematicalText mathText = new MathematicalText("x+y");
 mathText.getFormat().setFontHeight(28);

Returns: IPortionFormat

getChildren()

public final IMathElement[] getChildren()

Get children elements

Returns: com.aspose.slides.IMathElement[]