com.aspose.words
Class TextWrapping

java.lang.Object
    extended by 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 = builder.startTable();
builder.insertCell();
builder.write("Cell 1");
builder.insertCell();
builder.write("Cell 2");
builder.endTable();
table.setPreferredWidth(PreferredWidth.fromPoints(300.0));

builder.getFont().setSize(16.0);
builder.writeln("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");

// Set the "TextWrapping" property to "TextWrapping.Around" to get the table to wrap text around it,
// and push it down into the paragraph below by setting the position.
table.setTextWrapping(TextWrapping.AROUND);
table.setAbsoluteHorizontalDistance(100.0);
table.setAbsoluteVerticalDistance(20.0);

doc.save(getArtifactsDir() + "Table.WrapText.docx");

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.

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