OfficeMathDisplayType

Inheritance: java.lang.Object

public class OfficeMathDisplayType

Specifies the display format type of the equation.

Examples:

Shows how to set office math display formatting.


 Document doc = new Document(getMyDir() + "Office math.docx");

 OfficeMath officeMath = (OfficeMath) doc.getChild(NodeType.OFFICE_MATH, 0, true);

 // OfficeMath nodes that are children of other OfficeMath nodes are always inline.
 // The node we are working with is the base node to change its location and display type.
 Assert.assertEquals(MathObjectType.O_MATH_PARA, officeMath.getMathObjectType());
 Assert.assertEquals(NodeType.OFFICE_MATH, officeMath.getNodeType());
 Assert.assertEquals(officeMath.getParentNode(), officeMath.getParentParagraph());

 // Change the location and display type of the OfficeMath node.
 officeMath.setDisplayType(OfficeMathDisplayType.DISPLAY);
 officeMath.setJustification(OfficeMathJustification.LEFT);

 doc.save(getArtifactsDir() + "Shape.OfficeMath.docx");
 

Fields

FieldDescription
DISPLAYThe Office Math is displayed on its own line.
INLINEThe Office Math is displayed inline with the text.
length

Methods

MethodDescription
fromName(String officeMathDisplayTypeName)
getName(int officeMathDisplayType)
getValues()
toString(int officeMathDisplayType)

DISPLAY

public static int DISPLAY

The Office Math is displayed on its own line.

INLINE

public static int INLINE

The Office Math is displayed inline with the text.

length

public static int length

fromName(String officeMathDisplayTypeName)

public static int fromName(String officeMathDisplayTypeName)

Parameters:

ParameterTypeDescription
officeMathDisplayTypeNamejava.lang.String

Returns: int

getName(int officeMathDisplayType)

public static String getName(int officeMathDisplayType)

Parameters:

ParameterTypeDescription
officeMathDisplayTypeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int officeMathDisplayType)

public static String toString(int officeMathDisplayType)

Parameters:

ParameterTypeDescription
officeMathDisplayTypeint

Returns: java.lang.String