com.aspose.words

Class TextOrientation

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

Utility class containing constants. Specifies orientation of text on a page, in a table cell or a text frame.

Example:

Shows how to build a formatted table that contains 2 rows and 2 columns.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Table table = builder.startTable();

// Insert a cell
builder.insertCell();
// Use fixed column widths.
table.autoFit(AutoFitBehavior.FIXED_COLUMN_WIDTHS);

builder.getCellFormat().setVerticalAlignment(CellVerticalAlignment.CENTER);
builder.write("This is row 1 cell 1");

// Insert a cell
builder.insertCell();
builder.write("This is row 1 cell 2");

builder.endRow();

// Insert a cell
builder.insertCell();

// Apply new row formatting
builder.getRowFormat().setHeight(100);
builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);

builder.getCellFormat().setOrientation(TextOrientation.UPWARD);
builder.writeln("This is row 2 cell 1");

// Insert a cell
builder.insertCell();
builder.getCellFormat().setOrientation(TextOrientation.DOWNWARD);
builder.writeln("This is row 2 cell 2");

builder.endRow();

builder.endTable();

Field Summary
static final intHORIZONTAL = 0
Text is arranged horizontally (lr-tb).
static final intDOWNWARD = 1
Text is rotated 90 degrees to the right to appear from top to bottom (tb-rl).
static final intUPWARD = 3
Text is rotated 90 degrees to the left to appear from bottom to top (bt-lr).
static final intHORIZONTAL_ROTATED_FAR_EAST = 4
Text is arranged horizontally, but Far East characters are rotated 90 degrees to the left (lr-tb-v).
static final intVERTICAL_FAR_EAST = 5
Far East characters appear vertical, other text is rotated 90 degrees to the right to appear from top to bottom (tb-rl-v).
static final intVERTICAL_ROTATED_FAR_EAST = 7
Far East characters appear vertical, other text is rotated 90 degrees to the right to appear from top to bottom vertically, then left to right horizontally (tb-lr-v).
 

    • Field Detail

      • HORIZONTAL = 0

        public static final int HORIZONTAL
        Text is arranged horizontally (lr-tb).
      • DOWNWARD = 1

        public static final int DOWNWARD
        Text is rotated 90 degrees to the right to appear from top to bottom (tb-rl).
      • UPWARD = 3

        public static final int UPWARD
        Text is rotated 90 degrees to the left to appear from bottom to top (bt-lr).
      • HORIZONTAL_ROTATED_FAR_EAST = 4

        public static final int HORIZONTAL_ROTATED_FAR_EAST
        Text is arranged horizontally, but Far East characters are rotated 90 degrees to the left (lr-tb-v).
      • VERTICAL_FAR_EAST = 5

        public static final int VERTICAL_FAR_EAST
        Far East characters appear vertical, other text is rotated 90 degrees to the right to appear from top to bottom (tb-rl-v).
      • VERTICAL_ROTATED_FAR_EAST = 7

        public static final int VERTICAL_ROTATED_FAR_EAST
        Far East characters appear vertical, other text is rotated 90 degrees to the right to appear from top to bottom vertically, then left to right horizontally (tb-lr-v).