ICSSStyle style = this.getFigure().getCSSStyle();
if (style == null) {
_cellWidth = -1;
} else {
Object width = style.getStyleProperty(ICSSPropertyID.ATTR_WIDTH);
Length recommendedWidth = (width instanceof Length) ? (Length) width
: null;
int rw = 0;
if (recommendedWidth == null || recommendedWidth.getValue() <= 0) {
rw = 0;
} else {
if (recommendedWidth.isPercentage()) {
// percentage width is used for remaining width
// distribution, so not used here.
int colspan = this.getColSpan();
for (int i = 0; i < colspan; i++) {
tableInfo.setWidthPercentage(this.getColumnIndex() + i,
recommendedWidth.getValue() / colspan);
}
} else {
rw = recommendedWidth.getValue();
if (!style.isSizeIncludeBorderPadding()) {
rw += style.getBorderInsets().getWidth()
+ style.getPaddingInsets().getWidth();
}
if (this.getColSpan() == 1) {