com.aspose.words

Class LayoutFlow

  • java.lang.Object
    • com.aspose.words.LayoutFlow
public class LayoutFlow 
extends java.lang.Object

Utility class containing constants. Determines the flow of the text layout in a textbox.

Example:

Shows how to add text to a textbox and change its orientation
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape textbox = new Shape(doc, ShapeType.TEXT_BOX);
textbox.setWidth(100.0);
textbox.setHeight(100.0);
textbox.getTextBox().setLayoutFlow(LayoutFlow.BOTTOM_TO_TOP);

textbox.appendChild(new Paragraph(doc));
builder.insertNode(textbox);

builder.moveTo(textbox.getFirstParagraph());
builder.write("This text is flipped 90 degrees to the left.");

doc.save(getArtifactsDir() + "Drawing.TextBox.docx");
See Also:
TextBox.LayoutFlow

Field Summary
static final intHORIZONTAL = 0
Text is displayed horizontally.
static final intTOP_TO_BOTTOM_IDEOGRAPHIC = 1
Ideographic text is displayed vertically.
static final intBOTTOM_TO_TOP = 2
Text is displayed vertically.
static final intTOP_TO_BOTTOM = 3
Text is displayed vertically.
static final intHORIZONTAL_IDEOGRAPHIC = 4
Ideographic text is displayed horizontally.
static final intVERTICAL = 5
Text is displayed vertically.
 

    • Field Detail

      • HORIZONTAL = 0

        public static final int HORIZONTAL
        Text is displayed horizontally.
      • TOP_TO_BOTTOM_IDEOGRAPHIC = 1

        public static final int TOP_TO_BOTTOM_IDEOGRAPHIC
        Ideographic text is displayed vertically.
      • BOTTOM_TO_TOP = 2

        public static final int BOTTOM_TO_TOP
        Text is displayed vertically.
      • TOP_TO_BOTTOM = 3

        public static final int TOP_TO_BOTTOM
        Text is displayed vertically.
      • HORIZONTAL_IDEOGRAPHIC = 4

        public static final int HORIZONTAL_IDEOGRAPHIC
        Ideographic text is displayed horizontally.
      • VERTICAL = 5

        public static final int VERTICAL
        Text is displayed vertically.