public class OfficeMathDisplayType
extends java.lang.Object
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");
| Modifier and Type | Field and Description |
|---|---|
static int |
DISPLAY
The Office Math is displayed on its own line.
|
static int |
INLINE
The Office Math is displayed inline with the text.
|
static int |
length |
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String officeMathDisplayTypeName) |
static java.lang.String |
getName(int officeMathDisplayType) |
static int[] |
getValues() |
static java.lang.String |
toString(int officeMathDisplayType) |