public class PreferredWidthType
Example:
Document doc = new Document(getMyDir() + "Tables.docx");
// Find the first table in the document
Table table = (Table) doc.getChild(NodeType.TABLE, 0, true);
Cell firstCell = table.getFirstRow().getFirstCell();
Assert.assertEquals(PreferredWidthType.PERCENT, firstCell.getCellFormat().getPreferredWidth().getType());
Assert.assertEquals(11.16, firstCell.getCellFormat().getPreferredWidth().getValue());
Field Summary | ||
---|---|---|
static final int | AUTO | |
The preferred width is not specified. The actual width of the table or cell is either specified using the explicit width or
will be determined automatically by the table layout algorithm when the table is displayed, depending on the table auto fit setting.
|
||
static final int | PERCENT | |
Measure the current item width using a specified percentage.
|
||
static final int | POINTS | |
Measure the current item width using a specified number of points (1/72 inch).
|
public static final int AUTO
public static final int PERCENT
public static final int POINTS