if (band.getRightMargin() != null) {
width -= band.getRightMargin().getValue(Unit.PT);
}
int unsizedCols = 0;
for (int i = 0; i < band.getColumnCount(); ++i) {
Column col = band.getColumn(i);
if (col.getWidth() != null) {
width -= col.getWidth().getValue(Unit.PT);
} else {
++unsizedCols;
}
}
double unsizedWidth = 0;
if (unsizedCols > 0) {
unsizedWidth = width/unsizedCols;
}
for (int i = 0; i < band.getColumnCount(); ++i) {
Column col = band.getColumn(i);
double w = col.getWidth() == null
? unsizedWidth
: col.getWidth().getValue(Unit.PT);
columnStart[i+1] = columnStart[i] + w;
}
}