java.lang.Object
com.aspose.words.HeightRule
public class HeightRule
- extends java.lang.Object
Utility class containing constants.
Specifies the rule for determining the height of an object.
Example:
Shows how to create a table that contains a single cell and apply row formatting.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Table table = builder.startTable();
builder.insertCell();
// Set the row formatting
RowFormat rowFormat = builder.getRowFormat();
rowFormat.setHeight(100.0);
rowFormat.setHeightRule(HeightRule.EXACTLY);
// These formatting properties are set on the table and are applied to all rows in the table
table.setLeftPadding(30.0);
table.setRightPadding(30.0);
table.setTopPadding(30.0);
table.setBottomPadding(30.0);
builder.writeln("Contents of formatted row.");
builder.endRow();
builder.endTable();
doc.save(getArtifactsDir() + "DocumentBuilder.DocumentBuilderSetRowFormatting.docx");
Field Summary |
static final int | AT_LEAST = 0 | |
The height will be at least the specified height in points. It will grow, if needed,
to accommodate all text inside an object.
|
static final int | EXACTLY = 1 | |
The height is specified exactly in points. Please note that if the text cannot
fit inside the object of this height, it will appear truncated.
|
static final int | AUTO = 2 | |
The height will grow automatically to accommodate all text inside an object.
|
AT_LEAST = 0 | |
public static final int AT_LEAST |
-
The height will be at least the specified height in points. It will grow, if needed,
to accommodate all text inside an object.
EXACTLY = 1 | |
public static final int EXACTLY |
-
The height is specified exactly in points. Please note that if the text cannot
fit inside the object of this height, it will appear truncated.
AUTO = 2 | |
public static final int AUTO |
-
The height will grow automatically to accommodate all text inside an object.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.