public class PreferredWidthType
extends java.lang.Object
Examples:
Shows how to verify the preferred width type and value of a table cell.
Document doc = new Document(getMyDir() + "Tables.docx");
Table table = doc.getFirstSection().getBody().getTables().get(0);
Cell firstCell = table.getFirstRow().getFirstCell();
Assert.assertEquals(PreferredWidthType.PERCENT, firstCell.getCellFormat().getPreferredWidth().getType());
Assert.assertEquals(11.16d, firstCell.getCellFormat().getPreferredWidth().getValue());
PreferredWidth| Modifier and Type | Field and Description |
|---|---|
static int |
AUTO
The preferred width is not specified.
|
static int |
length |
static int |
PERCENT
Measure the current item width using a specified percentage.
|
static int |
POINTS
Measure the current item width using a specified number of points (1/72 inch).
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String preferredWidthTypeName) |
static java.lang.String |
getName(int preferredWidthType) |
static int[] |
getValues() |
static java.lang.String |
toString(int preferredWidthType) |
public static int AUTO
public static int PERCENT
public static int POINTS
public static int length