com.aspose.words
Class ShapeTextOrientation

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

public class ShapeTextOrientation 
extends java.lang.Object

Utility class containing constants. Specifies orientation of text in shapes.

Example:

Shows how to change orientation and rotation for data labels.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
ChartSeries series = shape.getChart().getSeries().get(0);
ChartDataLabelCollection dataLabels = series.getDataLabels();

// Show data labels.
series.hasDataLabels(true);
dataLabels.setShowValue(true);
dataLabels.setShowCategoryName(true);

// Define data label shape.
dataLabels.getFormat().setShapeType(ChartShapeType.UP_ARROW);
dataLabels.getFormat().getStroke().getFill().solid(Color.blue);

// Set data label orientation and rotation for the entire series.
dataLabels.setOrientation(ShapeTextOrientation.VERTICAL_FAR_EAST);
dataLabels.setRotation(-45);

// Change orientation and rotation of the first data label.
dataLabels.get(0).setOrientation(ShapeTextOrientation.HORIZONTAL);
dataLabels.get(0).setRotation(45);

doc.save(getArtifactsDir() + "Charts.LabelOrientationRotation.docx");

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 = 2
           Text is rotated 90 degrees to the left to appear from bottom to top (bt-lr).
static final intVERTICAL_FAR_EAST = 3
           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 = 4
           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).
static final intWORD_ART_VERTICAL = 5
           Text is vertical, with one letter on top of the other.
static final intWORD_ART_VERTICAL_RIGHT_TO_LEFT = 6
           Text is vertical, with one letter on top of the other, then right to left horizontally.
 

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 = 2

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

VERTICAL_FAR_EAST = 3

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 = 4

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).

WORD_ART_VERTICAL = 5

public static final int WORD_ART_VERTICAL
Text is vertical, with one letter on top of the other.

WORD_ART_VERTICAL_RIGHT_TO_LEFT = 6

public static final int WORD_ART_VERTICAL_RIGHT_TO_LEFT
Text is vertical, with one letter on top of the other, then right to left horizontally.

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