com.aspose.words
Class TextBoxAnchor

java.lang.Object
    extended by com.aspose.words.TextBoxAnchor

public class TextBoxAnchor 
extends java.lang.Object

Utility class containing constants. Specifies values used for shape text vertical alignment.

Example:

Shows how to change text position inside textbox shape.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape textBox = builder.insertShape(ShapeType.TEXT_BOX, 200.0, 200.0);
textBox.getTextBox().setVerticalAnchor(TextBoxAnchor.BOTTOM);

builder.moveTo(textBox.getFirstParagraph());
builder.write("Textbox contents");

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

Field Summary
static final intTOP = 0
           Text is aligned to the top of the textbox.
static final intMIDDLE = 1
           Text is aligned to the middle of the textbox.
static final intBOTTOM = 2
           Text is aligned to the bottom of the textbox.
static final intTOP_CENTERED = 3
           Text is aligned to the top centered of the textbox.
static final intMIDDLE_CENTERED = 4
           Text is aligned to the middle centered of the textbox.
static final intBOTTOM_CENTERED = 5
           Text is aligned to the bottom centered of the textbox.
static final intTOP_BASELINE = 6
           Text is aligned to the top baseline of the textbox.
static final intBOTTOM_BASELINE = 7
           Text is aligned to the bottom baseline of the textbox.
static final intTOP_CENTERED_BASELINE = 8
           Text is aligned to the top centered baseline of the textbox.
static final intBOTTOM_CENTERED_BASELINE = 9
           Text is aligned to the bottom centered baseline of the textbox.
 

Field Detail

TOP = 0

public static final int TOP
Text is aligned to the top of the textbox.

MIDDLE = 1

public static final int MIDDLE
Text is aligned to the middle of the textbox.

BOTTOM = 2

public static final int BOTTOM
Text is aligned to the bottom of the textbox.

TOP_CENTERED = 3

public static final int TOP_CENTERED
Text is aligned to the top centered of the textbox.

MIDDLE_CENTERED = 4

public static final int MIDDLE_CENTERED
Text is aligned to the middle centered of the textbox.

BOTTOM_CENTERED = 5

public static final int BOTTOM_CENTERED
Text is aligned to the bottom centered of the textbox.

TOP_BASELINE = 6

public static final int TOP_BASELINE
Text is aligned to the top baseline of the textbox.

BOTTOM_BASELINE = 7

public static final int BOTTOM_BASELINE
Text is aligned to the bottom baseline of the textbox.

TOP_CENTERED_BASELINE = 8

public static final int TOP_CENTERED_BASELINE
Text is aligned to the top centered baseline of the textbox.

BOTTOM_CENTERED_BASELINE = 9

public static final int BOTTOM_CENTERED_BASELINE
Text is aligned to the bottom centered baseline of the textbox.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.