LayoutFlow

Inheritance: java.lang.Object

public class LayoutFlow

Determines the flow of the text layout in a textbox.

Examples:

Shows how to add text to a text box, 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");
 

Fields

FieldDescription
BOTTOM_TO_TOPText is displayed vertically.
HORIZONTALText is displayed horizontally.
HORIZONTAL_IDEOGRAPHICIdeographic text is displayed horizontally.
TOP_TO_BOTTOMText is displayed vertically.
TOP_TO_BOTTOM_IDEOGRAPHICIdeographic text is displayed vertically.
VERTICALText is displayed vertically.
length

Methods

MethodDescription
fromName(String layoutFlowName)
getName(int layoutFlow)
getValues()
toString(int layoutFlow)

BOTTOM_TO_TOP

public static int BOTTOM_TO_TOP

Text is displayed vertically.

HORIZONTAL

public static int HORIZONTAL

Text is displayed horizontally.

HORIZONTAL_IDEOGRAPHIC

public static int HORIZONTAL_IDEOGRAPHIC

Ideographic text is displayed horizontally.

TOP_TO_BOTTOM

public static int TOP_TO_BOTTOM

Text is displayed vertically.

TOP_TO_BOTTOM_IDEOGRAPHIC

public static int TOP_TO_BOTTOM_IDEOGRAPHIC

Ideographic text is displayed vertically.

VERTICAL

public static int VERTICAL

Text is displayed vertically.

length

public static int length

fromName(String layoutFlowName)

public static int fromName(String layoutFlowName)

Parameters:

ParameterTypeDescription
layoutFlowNamejava.lang.String

Returns: int

getName(int layoutFlow)

public static String getName(int layoutFlow)

Parameters:

ParameterTypeDescription
layoutFlowint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int layoutFlow)

public static String toString(int layoutFlow)

Parameters:

ParameterTypeDescription
layoutFlowint

Returns: java.lang.String