/** * Get the width type for the table, as an {@link STTblWidth.Enum} value. * A table width can be specified as an absolute measurement (an integer * number of twips), a percentage, or the value "AUTO". * * @return The width type. * @since 4.0.0 */ public TableWidthType getWidthType() { return XWPFTable.getWidthType(getTcWidth()); }
/** * Set the width value type for the table. * <p>If the width type is changed from the current type and the currently-set value * is not consistent with the new width type, the value is reset to the default value * for the specified width type.</p> * * @param widthType Width type * @since 4.0.0 */ public void setWidthType(TableWidthType widthType) { XWPFTable.setWidthType(widthType, getTcWidth()); }
/** * Set the width to the value "auto", an integer value (20ths of a point), or a percentage ("nn.nn%"). * * @param widthValue String matching one of "auto", [0-9]+, or [0-9]+(\.[0-9]+)%. * @since 4.0.0 */ public void setWidth(String widthValue) { XWPFTable.setWidthValue(widthValue, getTcWidth()); }
public int getWidth() { return getTcWidth().getW().intValue(); } }
/** * Get the table width as a decimal value. * <p>If the width type is DXA or AUTO, then the value will always have * a fractional part of zero (because these values are really integers). * If the with type is percentage, then value may have a non-zero fractional * part. * * @return Width value as a double-precision decimal. * @since 4.0.0 */ public double getWidthDecimal() { return XWPFTable.getWidthDecimal(getTcWidth()); }
public int getWidth() { return getTcWidth().getW().intValue(); } }
/** * Get the width type for the table, as an {@link STTblWidth.Enum} value. * A table width can be specified as an absolute measurement (an integer * number of twips), a percentage, or the value "AUTO". * * @return The width type. * @since 4.0.0 */ public TableWidthType getWidthType() { return XWPFTable.getWidthType(getTcWidth()); }
/** * Set the width to the value "auto", an integer value (20ths of a point), or a percentage ("nn.nn%"). * * @param widthValue String matching one of "auto", [0-9]+, or [0-9]+(\.[0-9]+)%. * @since 4.0.0 */ public void setWidth(String widthValue) { XWPFTable.setWidthValue(widthValue, getTcWidth()); }
/** * Set the width value type for the table. * <p>If the width type is changed from the current type and the currently-set value * is not consistent with the new width type, the value is reset to the default value * for the specified width type.</p> * * @param widthType Width type * @since 4.0.0 */ public void setWidthType(TableWidthType widthType) { XWPFTable.setWidthType(widthType, getTcWidth()); }
/** * Get the table width as a decimal value. * <p>If the width type is DXA or AUTO, then the value will always have * a fractional part of zero (because these values are really integers). * If the with type is percentage, then value may have a non-zero fractional * part. * * @return Width value as a double-precision decimal. * @since 4.0.0 */ public double getWidthDecimal() { return XWPFTable.getWidthDecimal(getTcWidth()); }