com.aspose.words

Class TextWrapping

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

Utility class containing constants. Specifies how text is wrapped around the table.

Example:

Shows how to work with table text wrapping.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Table table = DocumentHelper.insertTable(builder);

if (table.getTextWrapping() == TextWrapping.AROUND) {
    Assert.assertEquals(table.getRelativeHorizontalAlignment(), HorizontalAlignment.DEFAULT);
    Assert.assertEquals(table.getRelativeVerticalAlignment(), VerticalAlignment.DEFAULT);
    Assert.assertEquals(table.getHorizontalAnchor(), RelativeHorizontalPosition.COLUMN);
    Assert.assertEquals(table.getVerticalAnchor(), RelativeVerticalPosition.MARGIN);
    Assert.assertEquals(table.getAbsoluteHorizontalDistance(), 0);
    Assert.assertEquals(table.getAbsoluteVerticalDistance(), 0);
    Assert.assertEquals(table.getAllowOverlap(), true);
}

Field Summary
static final intNONE = 0
Text and table is displayed in the order of their appearance in the document.
static final intAROUND = 1
Text is wrapped around the table occupying available side space.
static final intDEFAULT = 0
Default value.
 

    • Field Detail

      • NONE = 0

        public static final int NONE
        Text and table is displayed in the order of their appearance in the document.
      • AROUND = 1

        public static final int AROUND
        Text is wrapped around the table occupying available side space.
      • DEFAULT = 0

        public static final int DEFAULT
        Default value.